#27722 [NEW]: Better pointer check to avoid crashes
| From: | fjortiz at comunet dot es | Date: | Fri, 26 Mar 2004 18:10:59 +0000 |
| Subject: | #27722 [NEW]: Better pointer check to avoid crashes | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-56901@lists.php.net to get a copy of this message | ||
From: fjortiz at comunet dot es
Operating system: any
PHP version: 5.0.0RC1
PHP Bug Type: SOAP related
Bug description: Better pointer check to avoid crashes
Description:
------------
Hi,
In my WSDL I defined a schema and forgot the attibute "targetNamespace". I
know that's something you shoudn't forget, but, instead making Apache
crash, wouldn't it be more robust to check for NULL pointers and send a
gentle error?
Fortunately I have a debug PHP5RC1 installed so I located the crash:
php_schema.c line 1410
newType->namens = estrdup(ns->children->content);
Sure it crashes, ns==NULL ...
I guess it's the same problem for other retrieved elements/attributes.
PHP-SOAP should be capable of trapping any unvalidated XML.
If you are short of time I even offer myself to do some of that nasty
pointer-check around.
Thanks for your attention and your great efforts.
--
Edit bug report at http://bugs.php.net/?id=27722&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27722&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27722&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=27722&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=27722&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=27722&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=27722&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=27722&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=27722&r=support
Expected behavior: http://bugs.php.net/fix.php?id=27722&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=27722&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=27722&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=27722&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27722&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=27722&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=27722&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=27722&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27722&r=float