Skip to content

Commit 8108bc2

Browse files
committed
Fix asan memory error
1 parent f764cbf commit 8108bc2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/mbstring/mbstring.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3219,7 +3219,7 @@ PHP_FUNCTION(mb_levenshtein)
32193219

32203220
zend_long c0, c1, c2;
32213221

3222-
p1 = safe_emalloc(strlen_1 + 1, sizeof(zend_long), 0);
3222+
p1 = safe_emalloc(strlen_2 + 1, sizeof(zend_long), 0);
32233223
p2 = safe_emalloc(strlen_2 + 1, sizeof(zend_long), 0);
32243224

32253225
for (i2 = 0; i2 <= strlen_2; i2++) {

0 commit comments

Comments
 (0)