From aabda0f17f4cd037130a5bf87d05016cbb03fcdf Mon Sep 17 00:00:00 2001 From: DavidKorczynski Date: Sat, 16 Jul 2022 18:48:57 +0100 Subject: [PATCH] psycopg2: broaden exceptions (#8018) --- projects/psycopg2/fuzz_sql.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/projects/psycopg2/fuzz_sql.py b/projects/psycopg2/fuzz_sql.py index 2b802ba83..753bd5a35 100644 --- a/projects/psycopg2/fuzz_sql.py +++ b/projects/psycopg2/fuzz_sql.py @@ -31,8 +31,14 @@ def TestInput(data): q1.join([i1, i2]) query.format(q1, i3, i4) comp = sql.Composed([query, i5]) - except (TypeError, ValueError) as e: - pass + except ( + AttributeError, + TypeError, + ValueError, + KeyError, + IndexError + ) as e: + pass def main(): atheris.instrument_all()