Commits

Victor Stinner committed ba8f24c

fix issue #48: fix matroska parser, strip trailing null bytes

Comments (0)

Files changed (2)

hachoir-parser/ChangeLog

 ====================
 
  * torrent parser handles empty strings
+ * fix issue #48: fix matroska parser, strip trailing null bytes
 
 hachoir-parser 1.3.4 (2010-07-26)
 =================================

hachoir-parser/hachoir_parser/container/mkv.py

     return GenericInteger(parent, 'signed', True, parent['size'].value*8)
 
 def String(parent):
-    return _String(parent, 'string', parent['size'].value, charset="ASCII")
+    return _String(parent, 'string', parent['size'].value, charset="ASCII", strip="\0")
 
 def EnumString(parent, enum):
     return _Enum(String(parent), enum)