mirror of https://github.com/google/oss-fuzz.git
[oauth2]: fix unicode error and other error handling for issue 51904 (#8609)
Fix error handling for issue 51904 (https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=51904)
This commit is contained in:
parent
f8d1439cd6
commit
87d2c37a19
|
@ -29,7 +29,8 @@ def TestInput(data):
|
||||||
'Is a directory',
|
'Is a directory',
|
||||||
'Incorrect padding',
|
'Incorrect padding',
|
||||||
'Invalid base64-encoded string',
|
'Invalid base64-encoded string',
|
||||||
'could not be converted to'
|
'could not be converted to',
|
||||||
|
'contains invalid characters under NFKC normalization'
|
||||||
]
|
]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -64,7 +65,7 @@ def TestInput(data):
|
||||||
helpers._to_bytes(input)
|
helpers._to_bytes(input)
|
||||||
helpers._from_bytes(fdp.ConsumeUnicodeNoSurrogates(100))
|
helpers._from_bytes(fdp.ConsumeUnicodeNoSurrogates(100))
|
||||||
|
|
||||||
helpers._urlsafe_b64encode(fdp.ConsumeString(100))
|
helpers._urlsafe_b64encode(fdp.ConsumeUnicodeNoSurrogates(100))
|
||||||
input = fdp.ConsumeString(100).encode('ascii', errors='ignore').decode()
|
input = fdp.ConsumeString(100).encode('ascii', errors='ignore').decode()
|
||||||
helpers._urlsafe_b64decode(input)
|
helpers._urlsafe_b64decode(input)
|
||||||
except (ValueError, IOError, binascii.Error) as e:
|
except (ValueError, IOError, binascii.Error) as e:
|
||||||
|
|
Loading…
Reference in New Issue