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;
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;
}
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 {
/*