From: Marcus M. <mar...@us...> - 2017-07-25 21:39:00
|
Update of /cvsroot/libexif/libexif/libexif In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv30900/libexif Modified Files: exif-data.c Log Message: On saving makernotes, make sure the makernote container tags has a type with 1 byte components. Fixes (at least): https://sourceforge.net/p/libexif/bugs/130 https://sourceforge.net/p/libexif/bugs/129 Index: exif-data.c =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-data.c,v retrieving revision 1.131 retrieving revision 1.132 diff -u -d -r1.131 -r1.132 --- exif-data.c 12 Jul 2012 17:28:26 -0000 1.131 +++ exif-data.c 25 Jul 2017 21:38:56 -0000 1.132 @@ -255,6 +255,12 @@ exif_mnote_data_set_offset (data->priv->md, *ds - 6); exif_mnote_data_save (data->priv->md, &e->data, &e->size); e->components = e->size; + if (exif_format_get_size (e->format) != 1) { + /* e->format is taken from input code, + * but we need to make sure it is a 1 byte + * entity due to the multiplication below. */ + e->format = EXIF_FORMAT_UNDEFINED; + } } } |