improve error handling

This commit is contained in:
rfm 2025-04-16 22:50:49 +01:00
parent ddb68e1b29
commit 198b18c18a
2 changed files with 11 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2025-04-16 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSPropertyList.m: When parsing OpenStep style property list,
check for the case when a \U escape sequence produces invalid unicode
and produce an error message saying what happened.
2025-04-15 Wolfgang Lux <wolfgang.lux@gmail.com>
* Source/NSFileManager.m: Use the documented key for the file path

View file

@ -886,6 +886,11 @@ static inline id parseQuotedString(pldata* pld) NS_RETURNS_RETAINED
length: length
freeWhenDone: YES];
}
if (nil == obj)
{
pld->err = @"escape sequence produces invalid unicode";
return nil;
}
}
pld->pos++;
return obj;