From: Jan P. <pa...@us...> - 2009-09-26 08:18:37
|
Update of /cvsroot/libexif/libexif/libexif/pentax In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29548 Modified Files: mnote-pentax-entry.c Log Message: Avoid compiler warning signed/unsigned int mismatch. But do we really need the checks "if ((i+1)*4 > entry->size)"? Index: mnote-pentax-entry.c =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/pentax/mnote-pentax-entry.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -p -d -r1.19 -r1.20 --- mnote-pentax-entry.c 19 Sep 2009 05:16:04 -0000 1.19 +++ mnote-pentax-entry.c 26 Sep 2009 08:18:20 -0000 1.20 @@ -417,7 +417,7 @@ mnote_pentax_entry_get_value (MnotePenta case EXIF_FORMAT_SHORT: { const unsigned char *data = entry->data; - size_t len = strlen(val); + size_t i, len = strlen(val); for(i=0; i<entry->components; i++) { if ((i+1)*2 > entry->size) { // Prevent buffer overflow @@ -433,7 +433,7 @@ mnote_pentax_entry_get_value (MnotePenta case EXIF_FORMAT_LONG: { const unsigned char *data = entry->data; - size_t len = strlen(val); + size_t i, len = strlen(val); for(i=0; i<entry->components; i++) { if ((i+1)*4 > entry->size) { // Prevent buffer overflow |