Skip to content

Commit a0705e5

Browse files
committed
fix memset to be identical to what 7.3 does
1 parent e5fe7db commit a0705e5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/sass.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,10 @@ static void sass_free_storage(zend_object *object)
6060

6161
zend_object *sass_create_handler(zend_class_entry *type)
6262
{
63-
sass_object *obj = ecalloc(1,
64-
sizeof(sass_object) +
65-
zend_object_properties_size(type));
63+
size_t size = sizeof(sass_object) + zend_object_properties_size(type);
64+
65+
sass_object *obj = emalloc(size);
66+
memset(obj, 0, size - sizeof(zval));
6667

6768
zend_object_std_init(&obj->zo, type);
6869
object_properties_init(&obj->zo, type);

0 commit comments

Comments
 (0)