From: Jan P. <pa...@us...> - 2004-06-07 14:09:06
|
Update of /cvsroot/libexif/libexif/libexif/olympus In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19763 Modified Files: mnote-olympus-entry.c Log Message: Prevent crashes on too many unknown bytes: man strncat: only the first n characters of src are appended to dest. Index: mnote-olympus-entry.c =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/olympus/mnote-olympus-entry.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- mnote-olympus-entry.c 6 Jun 2004 03:04:21 -0000 1.12 +++ mnote-olympus-entry.c 7 Jun 2004 14:08:57 -0000 1.13 @@ -519,7 +519,7 @@ entry->size); for (i = 0; i < entry->size; i++) { sprintf (buf, " %02x", entry->data[i]); - strncat (v, buf, maxlen); + strncat (v, buf, maxlen - strlen (v)); } break; } |