From: Dan F. <dfa...@us...> - 2009-09-25 06:36:00
|
Update of /cvsroot/libexif/libexif/libexif In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11369/libexif Modified Files: exif-mem.c Log Message: Fixed some problems in MakerNote parsing that could cause a read past the end of a buffer and therefore a segfault. Allow MakerNote parsing to continue even if one tag parses incorrectly. Log an error whenever memory allocation fails in MakerNote parsing. Index: exif-mem.c =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-mem.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -p -d -r1.5 -r1.6 --- exif-mem.c 11 May 2007 02:37:21 -0000 1.5 +++ exif-mem.c 25 Sep 2009 06:35:48 -0000 1.6 @@ -9,18 +9,21 @@ struct _ExifMem { ExifMemFreeFunc free_func; }; +/*! Default memory allocation function. */ static void * exif_mem_alloc_func (ExifLong ds) { return calloc ((size_t) ds, 1); } +/*! Default memory reallocation function. */ static void * exif_mem_realloc_func (void *d, ExifLong ds) { return realloc (d, (size_t) ds); } +/*! Default memory free function. */ static void exif_mem_free_func (void *d) { |