Update of /cvsroot/libexif/libexif/libexif
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv15209/libexif
Modified Files:
exif-entry.c
Log Message:
Reverting zero termination patch, adding comment to avoid future confusion.
Index: exif-entry.c
===================================================================
RCS file: /cvsroot/libexif/libexif/libexif/exif-entry.c,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -p -d -r1.106 -r1.107
--- exif-entry.c 26 Jun 2007 02:58:28 -0000 1.106
+++ exif-entry.c 27 Jun 2007 11:15:50 -0000 1.107
@@ -581,9 +581,10 @@ exif_entry_get_value (ExifEntry *e, char
return val;
o = exif_data_get_byte_order (e->parent->parent);
+ /* make sure the returned string is zero terminated */
memset (val, 0, maxlen);
- memset (b, 0, sizeof (b));
maxlen--;
+ memset (b, 0, sizeof (b));
/* Sanity check */
if (e->size != e->components * exif_format_get_size (e->format)) {
@@ -1095,10 +1096,13 @@ exif_entry_get_value (ExifEntry *e, char
}
}
- val[maxlen-1] = '\0'; /* make sure the returned string is zero terminated */
return val;
}
+
+/**
+ * \bug Log and report failed exif_mem_malloc() calls.
+ */
void
exif_entry_initialize (ExifEntry *e, ExifTag tag)
{
|