From 10080b842067a53731b10951da6a0b1c33689e68 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 10 Apr 2008 21:49:40 +0000 Subject: [PATCH] decrease the risk of an overflow due to typecase from unsigned to signed git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17065 a1c6a512-1295-4272-9138-f99709370657 --- tools/convbdf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/convbdf.c b/tools/convbdf.c index 513b1d7007..010e8ee2c2 100644 --- a/tools/convbdf.c +++ b/tools/convbdf.c @@ -737,8 +737,8 @@ int rotleft(unsigned char *dst, /* output buffer */ src_words = BITMAP_WORDS(width) * height; if(((height + 7) / 8) * width > dstlen) { - fprintf(stderr, "%s:%d %d x %d overflows %d bytes buffer, needs %d\n", - __FILE__, __LINE__, width, height, (int)dstlen, + fprintf(stderr, "%s:%d %d x %d overflows %ld bytes buffer, needs %d\n", + __FILE__, __LINE__, width, height, (unsigned long)dstlen, ((height + 7) / 8) * width ); return 0; }