php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3952 shm_attach crashes httpd-process, if shmat fails
Submitted: 2000-03-28 18:31 UTC Modified: 2005-03-31 16:13 UTC
From: baumert at pilot-webdesign dot de Assigned:
Status: Wont fix Package: Reproducible Crash
PHP Version: 3.0.15 OS: Linux 2.0.36, 2.2.14
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: baumert at pilot-webdesign dot de
New email:
PHP Version: OS:

 

 [2000-03-28 18:31 UTC] baumert at pilot-webdesign dot de
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-31 16:13 UTC] php-bugs at lists dot php dot net
We are sorry, but we do not support PHP 3 related problems anymore.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri Dec 09 04:05:53 2022 UTC