checking to ensure that the buffer really is larger. Otherwise,
doubling zero gives us zero.
Pointy hat: /me
SVN-Revision: 85
struct file_info **new_pending_files;
int new_size = iso9660->pending_files_allocated * 2;
+ if (iso9660->pending_files_allocated < 1024)
+ new_size = 1024;
/* Overflow might keep us from growing the list. */
if (new_size <= iso9660->pending_files_allocated)
__archive_errx(1, "Out of memory");
- if (new_size < 1024)
- new_size = 1024;
new_pending_files = (struct file_info **)malloc(new_size * sizeof(new_pending_files[0]));
if (new_pending_files == NULL)
__archive_errx(1, "Out of memory");