Return to sprintf_chk.c CVS log | Up to [cvs.NetBSD.org] / src / lib / libc / ssp |
Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. |
version 1.5, 2008/04/28 20:23:00 | version 1.6, 2009/02/05 05:40:36 | ||
---|---|---|---|
|
|
||
if (slen > (size_t)INT_MAX) | if (slen > (size_t)INT_MAX) | ||
rv = vsprintf(buf, fmt, ap); | rv = vsprintf(buf, fmt, ap); | ||
else { | else { | ||
if ((rv = vsnprintf(buf, slen, fmt, ap)) >= 0 && rv >= slen) | if ((rv = vsnprintf(buf, slen, fmt, ap)) >= 0 && (size_t)rv >= slen) | ||
__chk_fail(); | __chk_fail(); | ||
} | } | ||
va_end(ap); | va_end(ap); |