[riot-notifications] [RIOT-OS/RIOT] gnrc_tcp: check if option length field is present before accessing it (#12249)

nmeum notifications at github.com
Mon Sep 16 21:09:18 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.

Thanks for pointing that out. I wanted to refer to fields, not bytes. Changed the commit message accordingly.

>  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.

Thanks for the quick feedback. Added a constant in the file you referenced. I still think that's a bad idea to parse variable-length options with a packed struct though, but maybe that can be addressed separately.

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...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190916/f14ba2c6/attachment.htm>

More information about the notifications mailing list