cvs: php4 /ext/exif exif.c
| From: | Ilia Alshanetsky | Date: | Tue, 08 Apr 2003 00:18:57 +0000 |
| Subject: | cvs: php4 /ext/exif exif.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-20158@lists.php.net to get a copy of this message | ||
iliaa Mon Apr 7 20:18:57 2003 EDT
Modified files:
/php4/ext/exif exif.c
Log:
Fixed bug #23102 (integer overflow in exif_iif_add_value()).
Index: php4/ext/exif/exif.c
diff -u php4/ext/exif/exif.c:1.143 php4/ext/exif/exif.c:1.144
--- php4/ext/exif/exif.c:1.143 Thu Apr 3 17:45:25 2003
+++ php4/ext/exif/exif.c Mon Apr 7 20:18:57 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: exif.c,v 1.143 2003/04/03 22:45:25 rasmus Exp $ */
+/* $Id: exif.c,v 1.144 2003/04/08 00:18:57 iliaa Exp $ */
/* ToDos
*
@@ -95,7 +95,7 @@
};
/* }}} */
-#define EXIF_VERSION "1.4 $Id: exif.c,v 1.143 2003/04/03 22:45:25 rasmus Exp $"
+#define EXIF_VERSION "1.4 $Id: exif.c,v 1.144 2003/04/08 00:18:57 iliaa Exp $"
/* {{{ PHP_MINFO_FUNCTION
*/
@@ -1528,6 +1528,10 @@
image_info_value *info_value;
image_info_data *info_data;
image_info_data *list;
+
+ if (length >= LONG_MAX) {
+ return;
+ }
list = erealloc(image_info->info_list[section_index].list,
(image_info->info_list[section_index].count+1)*sizeof(image_info_data));
image_info->info_list[section_index].list = list;