Update of /cvsroot/libexif/libexif/libexif/canon
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv20850/libexif/canon
Modified Files:
mnote-canon-entry.c
Log Message:
check NULL before dereferencing. (CID 5)
Index: mnote-canon-entry.c
===================================================================
RCS file: /cvsroot/libexif/libexif/libexif/canon/mnote-canon-entry.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -p -d -r1.21 -r1.22
--- mnote-canon-entry.c 10 May 2007 16:50:20 -0000 1.21
+++ mnote-canon-entry.c 11 May 2007 02:45:41 -0000 1.22
@@ -450,10 +450,13 @@ mnote_canon_entry_get_value (const Mnote
char buf[128];
ExifLong vl;
ExifShort vs, n;
- unsigned char *data = entry->data;
+ unsigned char *data;
double d;
- if (!entry) return NULL;
+ if (!entry)
+ return NULL;
+
+ data = entry->data;
memset (val, 0, maxlen);
maxlen--;
|