Skip to content

Commit d80ff39

Browse files
committed
fix (signed) integer overflow (part of bug #52550
1 parent 250393f commit d80ff39

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Zend/zend_hash.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ END_EXTERN_C()
331331
if (idx-1 > LONG_MAX) { /* overflow */ \
332332
break; \
333333
} \
334-
idx = (ulong)(-(long)idx); \
334+
idx = -idx; \
335335
} else if (idx > LONG_MAX) { /* overflow */ \
336336
break; \
337337
} \

0 commit comments

Comments
 (0)