Fix possible dereference of null pointer spotted by David Ayer.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22273 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2006-01-09 09:24:45 +00:00
parent 1659013d89
commit 514b954952

View file

@ -2493,9 +2493,11 @@ GSPropertyListMake(id obj, NSDictionary *loc, BOOL xml,
} }
else if (index_size < 1 || index_size > 4) else if (index_size < 1 || index_size > 4)
{ {
unsigned saved = offset_size;
DESTROY(self); // Bad format DESTROY(self); // Bad format
[NSException raise: NSGenericException [NSException raise: NSGenericException
format: @"Unknown table size %d", index_size]; format: @"Unknown table size %d", saved];
} }
else if (table_start > length - 32) else if (table_start > length - 32)
{ {