cvs: php4(PHP_4_0_7) /ext/sysvshm sysvshm.c
| From: | Derick Rethans | Date: | Thu, 22 Nov 2001 14:35:56 +0000 |
| Subject: | cvs: php4(PHP_4_0_7) /ext/sysvshm sysvshm.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-8285@lists.php.net to get a copy of this message | ||
derick Thu Nov 22 09:35:56 2001 EDT
Modified files: (Branch: PHP_4_0_7)
/php4/ext/sysvshm sysvshm.c
Log:
- MFH crash bug in shm_remove (not critical enough to include in the release,
but critical enough to MFH)
Index: php4/ext/sysvshm/sysvshm.c
diff -u php4/ext/sysvshm/sysvshm.c:1.45.2.1 php4/ext/sysvshm/sysvshm.c:1.45.2.2
--- php4/ext/sysvshm/sysvshm.c:1.45.2.1 Thu Oct 11 19:52:09 2001
+++ php4/ext/sysvshm/sysvshm.c Thu Nov 22 09:35:55 2001
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sysvshm.c,v 1.45.2.1 2001/10/11 23:52:09 ssb Exp $ */
+/* $Id: sysvshm.c,v 1.45.2.2 2001/11/22 14:35:55 derick Exp $ */
/* This has been built and tested on Linux 2.2.14
*
@@ -208,6 +208,12 @@
id = (*arg_id)->value.lval;
shm_list_ptr = (sysvshm_shm *) zend_list_find(id, &type);
+
+ if (!shm_list_ptr) {
+ php_error(E_WARNING, "The parameter is not a valid shm_indentifier");
+ RETURN_FALSE;
+ }
+
if(shmctl(shm_list_ptr->id,IPC_RMID,NULL)<0) {
php_error(E_WARNING, "shm_remove() failed for key 0x%x, id %i: %s",
shm_list_ptr->key, id,strerror(errno));
RETURN_FALSE;