Skip to content

Commit 1295663

Browse files
committed
Ensure we handle possible corruped data/frames.
We don't want to crash, and so if a frame as some invalid format detected by invariant we want to properly report an invalid frame. Part of S507-051.
1 parent ebdfbdb commit 1295663

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/http2/aws-http2-frame.adb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,11 @@ package body AWS.HTTP2.Frame is
178178
raise Protocol_Error with
179179
Exception_Message (C_Protocol_Error, "invalid frame kind");
180180
end case;
181+
182+
exception
183+
when others =>
184+
raise Protocol_Error with
185+
Exception_Message (C_Protocol_Error, "corruput frame");
181186
end Read;
182187

183188
----------

0 commit comments

Comments
 (0)