Skip to content

Commit d684590

Browse files
committed
Fix safe_erealloc() call
1 parent 5a83207 commit d684590

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/zip/php_zip.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ static char * php_zipobj_get_zip_comment(ze_zip_object *obj, int *len) /* {{{ */
579579
static void php_zipobj_add_buffer(ze_zip_object *obj, zend_string *str) /* {{{ */
580580
{
581581
size_t pos = obj->buffers_cnt++;
582-
obj->buffers = safe_erealloc(obj->buffers, sizeof(*obj->buffers), pos, 0);
582+
obj->buffers = safe_erealloc(obj->buffers, sizeof(*obj->buffers), obj->buffers_cnt, 0);
583583
obj->buffers[pos] = zend_string_copy(str);
584584
}
585585
/* }}} */

0 commit comments

Comments
 (0)