jssmith / ssqlite

Serverless SQLite Experiments
6 stars 3 forks source link

parse_exchange_id incorrectly parses `struct EXCHANGE_ID4resok` #25

Open scottnuma opened 5 years ago

scottnuma commented 5 years ago

discard_string attempts to discard a string of length 128 which goes beyond the bounds of the buffer b.

discard_string has been modified to skip to the end of the buffer rather than go beyond the bounds of the buffer.

If the program attempts to read again, after a too large discard_string, we'd likely see an "out of data" error.

The structure of can be found in the RFC 7863. I've started laying out the size of the struct in this spreadsheet.