#27722 [Opn->Asn]: Better pointer check to avoid crashes

From: Date: Fri, 26 Mar 2004 18:25:32 +0000
Subject: #27722 [Opn->Asn]: Better pointer check to avoid crashes
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-56902@lists.php.net to get a copy of this message
ID: 27722 Updated by: amt@php.net Reported By: fjortiz at comunet dot es -Status: Open +Status: Assigned Bug Type: SOAP related -Operating System: any +Operating System: * PHP Version: 5.0.0RC1 -Assigned To: +Assigned To: dmitry New Comment: We're always happy to take patches. Previous Comments: ------------------------------------------------------------------------ [2004-03-26 13:10:59] fjortiz at comunet dot es 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 this bug report at http://bugs.php.net/?id=27722&edit=1

« previous php.bugs (#56902) next »