You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Smith, David" <da...@lucent.com> on 2000/07/05 23:18:14 UTC
De-referencing a NULL pointer in XMLString::copyNString()
I can crash 1.2 DOMPrint in a call to XMLString::copyNString with :-
<?xml version="1.0"?>
<LAYOUT>
<SEGMENT name="">
</SEGMENT>
</LAYOUT>
(this is a much simplified version of the file that is causing me problems)
What appears to be happening is that it is de-referencing the source
pointer, when that pointer in NULL. I don't have a fix to offer for this as
it is not clear to me whether users of this method (and the other methods in
XMLString) should not pass it a NULL pointer, or should XMLString sanity
check the parameters it is passed. Ideas anyone?
Regards,
Dave
Re: De-referencing a NULL pointer in XMLString::copyNString()
Posted by Dean Roddey <dr...@charmedquark.com>.
De-referencing a NULL pointer in XMLString::copyNString()You have to check it, it does not check for a null. You can pass an empty string, but not a null pointer.
--------------------------
Dean Roddey
The CIDLib C++ Frameworks
Charmed Quark Software
droddey@charmedquark.com
http://www.charmedquark.com
"You young, and you gotcha health. Whatchoo wanna job fer?"
----- Original Message -----
From: Smith, David
To: Xerces-C-Dev (E-mail)
Sent: Wednesday, July 05, 2000 2:18 PM
Subject: De-referencing a NULL pointer in XMLString::copyNString()
I can crash 1.2 DOMPrint in a call to XMLString::copyNString with :-
<?xml version="1.0"?>
<LAYOUT>
<SEGMENT name="">
</SEGMENT>
</LAYOUT>
(this is a much simplified version of the file that is causing me problems)
What appears to be happening is that it is de-referencing the source pointer, when that pointer in NULL. I don't have a fix to offer for this as it is not clear to me whether users of this method (and the other methods in XMLString) should not pass it a NULL pointer, or should XMLString sanity check the parameters it is passed. Ideas anyone?
Regards,
Dave