{
void *tmp;
+ /* This is not a malloc/realloc check. It is a plausibility check for the
+ * function parameters (requirements engineering).
+ */
if (section_index >= ImageInfo->file.count) {
EXIF_ERRLOG_FSREALLOC
return -1;
}
tmp = erealloc(ImageInfo->file.list[section_index].data, size);
- if (size == 0 || section_index >= ImageInfo->file.count) {
- return -1;
- }
- tmp = erealloc(ImageInfo->file.list[section_index].data, size);
ImageInfo->file.list[section_index].data = tmp;
ImageInfo->file.list[section_index].size = size;
return 0;