We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f985667 commit 791700dCopy full SHA for 791700d
ext/session/session.c
@@ -904,10 +904,9 @@ PS_SERIALIZER_DECODE_FUNC(php_binary) /* {{{ */
904
PHP_VAR_UNSERIALIZE_INIT(var_hash);
905
906
for (p = val; p < endptr; ) {
907
- // Can this be changed to size_t?
908
- int namelen = ((unsigned char)(*p)) & (~PS_BIN_UNDEF);
+ size_t namelen = ((unsigned char)(*p)) & (~PS_BIN_UNDEF);
909
910
- if (namelen < 0 || namelen > PS_BIN_MAX || (p + namelen) >= endptr) {
+ if (namelen > PS_BIN_MAX || (p + namelen) >= endptr) {
911
PHP_VAR_UNSERIALIZE_DESTROY(var_hash);
912
return FAILURE;
913
}
0 commit comments