fortify-headers

standalone fortify-source implementation
git clone git://git.2f30.org/fortify-headers.git
Log | Files | Refs | README | LICENSE

commit 4514109df1b70fa24d30b3775db78e118cca4335
parent d87f9d94e15307d604fb8d8d7f3c83e046febcf0
Author: sin <sin@2f30.org>
Date:   Tue Mar  3 17:11:16 +0000

Fix signed/unsigned warning

Diffstat:
include/stdio.h | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/stdio.h b/include/stdio.h @@ -49,7 +49,7 @@ __fortify_vsprintf(char *s, const char *fmt, __builtin_va_list ap) size_t bos = __builtin_object_size(s, 0); int r; - if (bos != -1) { + if (bos != (size_t)-1) { r = vsnprintf(s, bos, fmt, ap); if (r != -1 && (size_t)r >= bos) __builtin_trap(); @@ -94,7 +94,7 @@ __fortify_vsnprintf(char *s, size_t n, const char *fmt, __builtin_va_list ap) #define sprintf(s, fmt, ...) ({ \ size_t bos = __builtin_object_size(s, 0); \ int r; \ - if (bos != -1) { \ + if (bos != (size_t)-1) { \ r = (snprintf)(s, bos, fmt, ## __VA_ARGS__); \ if (r != -1 && (size_t)r >= bos) \ __builtin_trap(); \