From: Lutz M?l. <lu...@us...> - 2003-12-07 23:26:08
|
Update of /cvsroot/libexif/libexif/libexif In directory sc8-pr-cvs1:/tmp/cvs-serv14173/libexif Modified Files: exif-entry.c Log Message: 2003-12-08 Lutz Mueller <lu...@us...> Suggestion by Jan Patera <pa...@pi...>: * libexif/exif-entry.c: Do not read beyond e->size. Index: exif-entry.c =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-entry.c,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- exif-entry.c 1 Dec 2003 18:09:28 -0000 1.40 +++ exif-entry.c 7 Dec 2003 23:26:05 -0000 1.41 @@ -177,7 +177,7 @@ case EXIF_TAG_USER_COMMENT: CF (e->format, EXIF_FORMAT_UNDEFINED, v); if (e->size < 8) break; - strncpy (v, e->data + 8, sizeof (v) - 1); + strncpy (v, e->data + 8, MIN (e->size, sizeof (v) - 1)); break; case EXIF_TAG_EXIF_VERSION: CF (e->format, EXIF_FORMAT_UNDEFINED, v); |