From 17864fc3e98e00d515a5a13b1390b340da7a66d9 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Tue, 23 Jan 2007 00:23:17 +0000 Subject: [PATCH] emalloc() -> safe_emalloc() --- ext/exif/exif.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/exif/exif.c b/ext/exif/exif.c index d639d31abd..d44ca16ba9 100644 --- a/ext/exif/exif.c +++ b/ext/exif/exif.c @@ -1606,7 +1606,7 @@ static int exif_file_sections_add(image_info_type *ImageInfo, int type, size_t s if (!size) { data = NULL; } else if (data == NULL) { - data = emalloc(size); + data = safe_emalloc(size, 1, 0); } ImageInfo->file.list[count].type = type; ImageInfo->file.list[count].data = data; @@ -2383,7 +2383,7 @@ static void* exif_ifd_make_value(image_info_data *info_data, int motorola_intel image_info_value *info_value; byte_count = php_tiff_bytes_per_format[info_data->format] * info_data->length; - value_ptr = emalloc(max(byte_count, 4)); + value_ptr = safe_emalloc(max(byte_count, 4), 1, 0); memset(value_ptr, 0, 4); if (!info_data->length) { return value_ptr; @@ -2875,7 +2875,7 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha } if (byte_count>sizeof(cbuf)) { /* mark as outside range and get buffer */ - value_ptr = emalloc(byte_count); + value_ptr = safe_emalloc(byte_count, 1, 0); outside = value_ptr; } else { /* -- 2.50.1