[riot-notifications] [RIOT-OS/RIOT] gnrc_tcp: check if option length field is present before accessing it (#12249)
notifications at github.com
Mon Sep 16 14:07:27 CEST 2019
TCP options have a maximum size of 3 byte (kind, length, value). The
current code only checks for the presence of the first field. Before
accessing the second field (length) the code must ensure that a length
field is even present.
**Discussion:** Change is somewhat ugly as it introduces a magic constant.
The proper way of solving this would probably be not using a packed struct
to parse these variable-length options.
You can view, comment on, or merge this pull request online at:
-- Commit Summary --
* gnrc_tcp: check if option length field is present before accessing it
-- File Changes --
M sys/net/gnrc/transport_layer/tcp/gnrc_tcp_option.c (4)
-- Patch Links --
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications