Permalink
Browse files

- Fixed bug #54193 (Integer overflow in shmop_read())

  • Loading branch information...
1 parent a37cf68 commit 4fcffb544368dabaea568df4450e217a1e2200a4 @felipensp felipensp committed Mar 8, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 ext/shmop/shmop.c
View
@@ -256,7 +256,7 @@ PHP_FUNCTION(shmop_read)
RETURN_FALSE;
}
- if (start + count > shmop->size || count < 0) {
+ if (count < 0 || start > (INT_MAX - count) || start + count > shmop->size) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "count is out of range");
RETURN_FALSE;
}

0 comments on commit 4fcffb5

Please sign in to comment.