mirror of https://github.com/google/oss-fuzz.git
pyyaml: catch recursion exceptions (#8227)
Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50061
This commit is contained in:
parent
65e2d97a6a
commit
de098f51a6
|
@ -28,6 +28,8 @@ def TestOneInput(input_bytes):
|
|||
context = yaml.load(input_bytes, Loader=yaml.FullLoader)
|
||||
except yaml.YAMLError:
|
||||
pass
|
||||
except RecursionError:
|
||||
pass
|
||||
|
||||
def main():
|
||||
atheris.Setup(sys.argv, TestOneInput, enable_python_coverage=True)
|
||||
|
|
|
@ -28,6 +28,8 @@ def TestOneInput(data):
|
|||
stream.forward()
|
||||
except yaml.reader.ReaderError:
|
||||
None
|
||||
except RecursionError:
|
||||
pass
|
||||
|
||||
return
|
||||
|
||||
|
|
Loading…
Reference in New Issue