cvs: php-src(PHP_4_3) /ext/shmop shmop.c
| From: | Ilia Alshanetsky | Date: | Sat, 27 Nov 2004 18:18:20 +0000 |
| Subject: | cvs: php-src(PHP_4_3) /ext/shmop shmop.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-29335@lists.php.net to get a copy of this message | ||
iliaa Sat Nov 27 13:18:20 2004 EDT
Modified files: (Branch: PHP_4_3)
/php-src/ext/shmop shmop.c
Log:
MFH: Improve offset check inside shmop_write().
http://cvs.php.net/diff.php/php-src/ext/shmop/shmop.c?r1=1.23.8.2&r2=1.23.8.3&ty=u
Index: php-src/ext/shmop/shmop.c
diff -u php-src/ext/shmop/shmop.c:1.23.8.2 php-src/ext/shmop/shmop.c:1.23.8.3
--- php-src/ext/shmop/shmop.c:1.23.8.2 Tue Dec 31 11:35:20 2002
+++ php-src/ext/shmop/shmop.c Sat Nov 27 13:18:19 2004
@@ -16,7 +16,7 @@
| Ilia Alshanetsky <ilia@prohost.org> |
+----------------------------------------------------------------------+
*/
-/* $Id: shmop.c,v 1.23.8.2 2002/12/31 16:35:20 sebastian Exp $ */
+/* $Id: shmop.c,v 1.23.8.3 2004/11/27 18:18:19 iliaa Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -316,7 +316,7 @@
RETURN_FALSE;
}
- if (offset > shmop->size) {
+ if (offset < 0 || offset > shmop->size) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "offset out of range");
RETURN_FALSE;
}