[ python-Bugs-985064 ] plistlib crashes too easily on bad files
SourceForge.net
noreply at sourceforge.net
Sun Jul 4 17:30:29 EDT 2004
Bugs item #985064, was opened at 2004-07-04 23:30
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=985064&group_id=5470
Category: Macintosh
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jack Jansen (jackjansen)
Assigned to: Just van Rossum (jvr)
Summary: plistlib crashes too easily on bad files
Initial Comment:
Plistlib doesn't do much error checking, and it can crash on bad
input. Moreover, it doesn't provide much help if it does crash (no
linenumbers, etc).
The problem I ran into was a dangling <key>foo</key>. After this
key the dict ended, but the next entry in the surrounding
datastructure, an array, picked up the key from self.currentKey
and crashed in addObject().
I was about to fix this when I noticed that there's lots of problems
with <key> handling, duplicates or missing ones aren't detected
either and can cause crashes too. It may be better to put a general
try/except in parse() and print a line number or something in case
of a failure.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=985064&group_id=5470
More information about the Python-bugs-list
mailing list