summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/session/session.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/session/session.c b/ext/session/session.c
index 6b72224882..a87e312ad9 100644
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@ -478,7 +478,7 @@ PS_SERIALIZER_DECODE_FUNC(php_binary)
zval **tmp;
namelen = *p & (~PS_BIN_UNDEF);
- if (namelen > PS_BIN_MAX || (p + namelen) >= endptr) {
+ if (namelen < 0 || namelen > PS_BIN_MAX || (p + namelen) >= endptr) {
return FAILURE;
}