Bug #3952: shm_attach crashes httpd-process, if shmat fails
| From: | baumert at pilot-webdesign dot de | Date: | Tue, 28 Mar 2000 23:31:06 +0000 |
| Subject: | Bug #3952: shm_attach crashes httpd-process, if shmat fails | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-17335@lists.php.net to get a copy of this message | ||
From: baumert@pilot-webdesign.de
Operating system: Linux 2.0.36, 2.2.14
PHP version: 3.0.15
PHP Bug Type: Reproduceable crash
Bug description: shm_attach crashes httpd-process, if shmat fails
shm_attach asks, if the return value of shmat is zero. This never happens.
The error-condition return value is -1.
So just change 162 from
if((shm_ptr = shmat(shm_id,NULL,0))==NULL) {
to
if((shm_ptr = shmat(shm_id,NULL,0))==-1) {
Greetings
Florian