fix null pointer deref

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36519 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2013-04-14 06:31:52 +00:00
parent 74c57bc2ce
commit 8e82768973

View file

@ -437,11 +437,12 @@ GS_PRIVATE_INTERNAL(NSXMLDocument)
NSUInteger index = 0;
int count = [[arguments allKeys] count];
*params = NSZoneCalloc([self zone], ((count + 1) * 2), sizeof(xmlChar *));
params = NSZoneCalloc([self zone], ((count + 1) * 2), sizeof(xmlChar *));
while ((key = [en nextObject]) != nil)
{
params[index] = (xmlChar *)XMLSTRING(key);
params[index + 1] = (xmlChar *)XMLSTRING([arguments objectForKey: key]);
params[index + 1]
= (xmlChar *)XMLSTRING([arguments objectForKey: key]);
index += 2;
}
params[index] = NULL;