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
This commit is contained in:
parent
bf8e9994c0
commit
10080b8420
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue