mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Fix bug dereferencing null pointer under some conditions.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22515 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d873a6f390
commit
a531412909
2 changed files with 11 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
|||
2006-02-18 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSFileManager.m: Fix bug dereferencing nul pointer under
|
||||
some conditions.
|
||||
|
||||
2006-02-17 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSFileManager.m: Implement method to get name of files
|
||||
|
|
|
@ -231,8 +231,8 @@
|
|||
*/
|
||||
@interface GSAttrDictionary : NSDictionary
|
||||
{
|
||||
_CHAR *_path;
|
||||
struct _STATB statbuf;
|
||||
_CHAR _path[0];
|
||||
}
|
||||
+ (NSDictionary*) attributesAt: (const _CHAR*)lpath
|
||||
traverseLink: (BOOL)traverse;
|
||||
|
@ -2746,10 +2746,12 @@ static NSSet *fileKeys = nil;
|
|||
{
|
||||
DESTROY(d);
|
||||
}
|
||||
d->_path = (_CHAR*)&d[1];
|
||||
for (i = 0; i <= l; i++)
|
||||
if (d != nil)
|
||||
{
|
||||
d->_path[i] = lpath[i];
|
||||
for (i = 0; i <= l; i++)
|
||||
{
|
||||
d->_path[i] = lpath[i];
|
||||
}
|
||||
}
|
||||
return AUTORELEASE(d);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue