You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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"));
Thank you for the report. The issue has been fixed and will be included in the next release.
The parse method will now throw a PropertyListFormatException if an invalid trailer is detected.
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.
The text was updated successfully, but these errors were encountered: