From: Lutz M?l. <lu...@us...> - 2003-08-25 04:44:33
|
Update of /cvsroot/libexif/libexif/libexif In directory sc8-pr-cvs1:/tmp/cvs-serv769/libexif Modified Files: exif-data.c Log Message: 2003-08-25 Lutz Mueller <lu...@us...> * libexif/exif-data.c: Fill unneeded bytes with 0. Suggestion by Roberto Costa <rob...@en...>. Index: exif-data.c =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-data.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- exif-data.c 29 Jul 2003 22:45:10 -0000 1.25 +++ exif-data.c 25 Aug 2003 04:44:30 -0000 1.26 @@ -150,7 +150,10 @@ data->priv->order, doff); } else doff = offset + 8; + + /* Write the data. Fill unneeded bytes with 0. */ memcpy (*d + 6 + doff, entry->data, entry->size); + if (s < 4) memset (*d + 6 + doff + s, 0, (4 - s)); } static void |