@@ -0,0 +1,1048 @@
+import sys%0A%0Aimport atheris%0A%0A%0Awith atheris.instrument_imports():%0A    from websockets.exceptions import PayloadTooBig, ProtocolError%0A    from websockets.frames import Frame%0A    from websockets.streams import StreamReader%0A%0A%0Adef test_one_input(data):%0A    fdp = atheris.FuzzedDataProvider(data)%0A    mask = fdp.ConsumeBool()%0A    max_size_enabled = fdp.ConsumeBool()%0A    max_size = fdp.ConsumeInt(4)%0A    payload = fdp.ConsumeBytes(atheris.ALL_REMAINING)%0A%0A    reader = StreamReader()%0A    reader.feed_data(payload)%0A    reader.feed_eof()%0A%0A    parser = Frame.parse(%0A        reader.read_exact,%0A        mask=mask,%0A        max_size=max_size if max_size_enabled else None,%0A    )%0A%0A    try:%0A        next(parser)%0A    except StopIteration:%0A        pass  # response is available in exc.value%0A    except (%0A        PayloadTooBig,  # frame's payload size exceeds %60%60max_size%60%60%0A        ProtocolError,  # frame contains incorrect values%0A    ):%0A        pass%0A%0A%0Adef main():%0A    atheris.Setup(sys.argv, test_one_input)%0A    atheris.Fuzz()%0A%0A%0Aif __name__ == %22__main__%22:%0A    main()%0A

Add fuzz target for WebSocket parser.