From d055ff4a94e5fe2f06a1454c4baa60c641ea8012 Mon Sep 17 00:00:00 2001 From: Teruaki Kawashima Date: Mon, 1 Nov 2010 12:13:49 +0000 Subject: reduce casts between "unsinged char *" and "fb_data *". make calculation precise. maintain spaces. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28428 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/imageviewer/png/tinflate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apps/plugins/imageviewer/png/tinflate.c') diff --git a/apps/plugins/imageviewer/png/tinflate.c b/apps/plugins/imageviewer/png/tinflate.c index b142f7afe7..95d8e2b483 100644 --- a/apps/plugins/imageviewer/png/tinflate.c +++ b/apps/plugins/imageviewer/png/tinflate.c @@ -148,7 +148,7 @@ TINF_TABLES tbl = { 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f}, }, - + .length_bits = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04, 0x04, @@ -494,7 +494,7 @@ int tinf_uncompress(void *dest, unsigned int *destLen, } if (res != TINF_OK) return TINF_DATA_ERROR; - + if (d.source > (unsigned char *)source + sourceLen) return TINF_DATA_ERROR; } while (!bfinal); -- cgit v1.2.3