Hello,
Our application has to deal with a lot of plist files that usually come from unknown sources. Sometimes it's corrupted files but with a correct header.
When I run BinaryPropertyListParser on the attached sample file it will produce an OutOfMemoryError which sometimes can crash the entire application. It would be great to improve the validation part and throw an exception if incorrect header or trailer is detected:
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at com.dd.plist.BinaryPropertyListParser.doParse(BinaryPropertyListParser.java:135)
at com.dd.plist.BinaryPropertyListParser.parse(BinaryPropertyListParser.java:87)
at com.dd.plist.BinaryPropertyListParser.parse(BinaryPropertyListParser.java:154)
at com.dd.plist.BinaryPropertyListParser.parse(BinaryPropertyListParser.java:166)
at PlistIssue.main(PlistIssue.java:10)
Code to produce:
BinaryPropertyListParser.parse(new File("sample.plist"));
Version used: 1.20
Sample file: sample.plist.zip
Thanks.
Hello,
Our application has to deal with a lot of plist files that usually come from unknown sources. Sometimes it's corrupted files but with a correct header.
When I run BinaryPropertyListParser on the attached sample file it will produce an OutOfMemoryError which sometimes can crash the entire application. It would be great to improve the validation part and throw an exception if incorrect header or trailer is detected:
Code to produce:
BinaryPropertyListParser.parse(new File("sample.plist"));Version used: 1.20
Sample file: sample.plist.zip
Thanks.