mirror of https://github.com/google/oss-fuzz.git
ftfy: capture unicode encode errors (#8226)
fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50062
This commit is contained in:
parent
84ffe92c14
commit
65e2d97a6a
|
@ -35,6 +35,8 @@ def TestInput(data):
|
|||
f.close()
|
||||
|
||||
ftfy.guess_bytes(fdp.ConsumeBytes(100))
|
||||
except UnicodeEncodeError as e2:
|
||||
pass
|
||||
except UnicodeError as e:
|
||||
if "Hey wait, this isn't Unicode." not in str(e):
|
||||
raise e
|
||||
|
|
Loading…
Reference in New Issue