Skip to content

Commit

Permalink
Fixed bug #51008 (Zend/tests/bug45877.phpt fails)
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Oct 5, 2010
1 parent bf7e6f9 commit 455db21
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions NEWS
Expand Up @@ -107,6 +107,7 @@
- Fixed bug #51610 (Using oci_connect causes PHP to take a long time to
exit). Requires Oracle bug fix 9891199 for this patch to have an
effect. (Oracle Corp.)
- Fixed bug #51008 (Zend/tests/bug45877.phpt fails). (Dmitry)
- Fixed bug #50590 (IntlDateFormatter::parse result is limited to the integer
range). (Stas)
- Fixed bug #50481 (Storing many SPLFixedArray in an array crashes). (Felipe)
Expand Down
8 changes: 4 additions & 4 deletions Zend/zend_hash.h
Expand Up @@ -312,7 +312,7 @@ END_EXTERN_C()
} \
if (*tmp >= '0' && *tmp <= '9') { /* possibly a numeric index */ \
const char *end = key + length - 1; \
long idx; \
ulong idx; \
\
if ((*end != '\0') /* not a null terminated string */ \
|| (*tmp == '0' && length > 2) /* numbers with leading zeros */ \
Expand All @@ -328,11 +328,11 @@ END_EXTERN_C()
} \
if (tmp == end) { \
if (*key == '-') { \
idx = -idx; \
if (idx > 0) { /* overflow */ \
if (idx-1 > LONG_MAX) { /* overflow */ \
break; \
} \
} else if (idx < 0) { /* overflow */ \
idx = (ulong)(-(long)idx); \
} else if (idx > LONG_MAX) { /* overflow */ \
break; \
} \
return func; \
Expand Down

0 comments on commit 455db21

Please sign in to comment.