cvs: php4 /ext/exif exif.c
| From: | Marcus B�rger | Date: | Fri, 29 Mar 2002 01:32:27 +0000 |
| Subject: | cvs: php4 /ext/exif exif.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-10754@lists.php.net to get a copy of this message | ||
helly Thu Mar 28 20:32:27 2002 EDT
Modified files:
/php4/ext/exif exif.c
Log:
-fix possible problem on low memory
-fix problem on failure
Index: php4/ext/exif/exif.c
diff -u php4/ext/exif/exif.c:1.75 php4/ext/exif/exif.c:1.76
--- php4/ext/exif/exif.c:1.75 Sun Mar 24 20:08:39 2002
+++ php4/ext/exif/exif.c Thu Mar 28 20:32:26 2002
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: exif.c,v 1.75 2002/03/25 01:08:39 hholzgra Exp $ */
+/* $Id: exif.c,v 1.76 2002/03/29 01:32:26 helly Exp $ */
/* ToDos
*
@@ -100,7 +100,7 @@
};
/* }}} */
-#define EXIF_VERSION "1.3 $Id: exif.c,v 1.75 2002/03/25 01:08:39 hholzgra Exp $"
+#define EXIF_VERSION "1.3 $Id: exif.c,v 1.76 2002/03/29 01:32:26 helly Exp $"
PHP_MINFO_FUNCTION(exif);
@@ -1052,7 +1052,7 @@
if ( !info_value->s) {
EXIF_ERRLOG_EALLOC
info_data->length = 0;
- return;
+ break; /* better return with "" instead of possible casing problems */
}
break;
@@ -3060,7 +3060,8 @@
ImageInfo.sections_found |= FOUND_COMPUTED;/* do not inform about in debug*/
- if (ret==FALSE || array_init(return_value) == FAILURE || (sections_needed &&
!(sections_needed&ImageInfo.sections_found))) {
+ if (ret==FALSE || (sections_needed && !(sections_needed&ImageInfo.sections_found) ||
array_init(return_value) == FAILURE)) {
+ /* array_init must be checked at last! otherwise the array must be freed if a later test fails.
*/
exif_discard_imageinfo(&ImageInfo);
if ( sections_str) efree(sections_str);
RETURN_FALSE;