Additional error checking

This commit is contained in:
Jan Petykiewicz 2020-04-18 15:35:29 -07:00
commit 06de10062d
2 changed files with 16 additions and 0 deletions

View file

@ -1865,6 +1865,8 @@ class Path(Record):
return PathExtensionScheme.HalfWidth, None
elif ext_scheme == 3:
return PathExtensionScheme.Arbitrary, read_sint(stream)
else:
raise InvalidDataError('Invalid ext_scheme: {}'.format(ext_scheme))
optional['extension_start'] = get_pathext(scheme_start)
optional['extension_end'] = get_pathext(scheme_end)