[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 19:26:41 CEST 2019
Good catch again. First of all TCP options do not have a length maximum size of three bytes as stated in the PR descriptions.
Supported Options introduced with the original TCP have either a single Byte (EOL and NOP) or four Bytes (MSS). Additional TCP extensions introduce options with variable length. That been said you are right, the length field must be checked before access.
Now to your PR. The Logic is fine, but usage of a magic numbers
goes against the RIOT Styleguide. However you could place a constant in 'sys/include/net/tcp.h' and use it in the affected code segment.
If you change that you get my ACK.
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