diff options
author | Daniel Stenberg <daniel@haxx.se> | 2008-04-10 21:49:40 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2008-04-10 21:49:40 +0000 |
commit | 10080b842067a53731b10951da6a0b1c33689e68 (patch) | |
tree | 2b7cc845b0bab3933dd1e4fbdc80f1d07ca30cc7 | |
parent | bf8e9994c0df66eedc980cef2f62cfc550471970 (diff) | |
download | rockbox-10080b842067a53731b10951da6a0b1c33689e68.tar.gz rockbox-10080b842067a53731b10951da6a0b1c33689e68.zip |
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
-rw-r--r-- | tools/convbdf.c | 4 |
1 files 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 */ | |||
737 | src_words = BITMAP_WORDS(width) * height; | 737 | src_words = BITMAP_WORDS(width) * height; |
738 | 738 | ||
739 | if(((height + 7) / 8) * width > dstlen) { | 739 | if(((height + 7) / 8) * width > dstlen) { |
740 | fprintf(stderr, "%s:%d %d x %d overflows %d bytes buffer, needs %d\n", | 740 | fprintf(stderr, "%s:%d %d x %d overflows %ld bytes buffer, needs %d\n", |
741 | __FILE__, __LINE__, width, height, (int)dstlen, | 741 | __FILE__, __LINE__, width, height, (unsigned long)dstlen, |
742 | ((height + 7) / 8) * width ); | 742 | ((height + 7) / 8) * width ); |
743 | return 0; | 743 | return 0; |
744 | } | 744 | } |