[riot-notifications] [RIOT-OS/RIOT] net/nanocoap: iterate options (#12074)

Ken Bannister notifications at github.com
Mon Sep 9 12:23:38 CEST 2019

kb2ma commented on this pull request.

>   */
 static uint8_t *_parse_option(const coap_pkt_t *pkt,
                               uint8_t *pkt_pos, uint16_t *delta, int *opt_len)
     uint8_t *hdr_end = pkt->payload;
-    if (pkt_pos == hdr_end) {
+    if ((pkt_pos >= hdr_end)
+            || (((pkt_pos + 1) == hdr_end) && (*pkt_pos == 0xFF))) {

Thanks for pushing this PR forward, @smlng. I will look and comment later this week before your point gets lost in my memory.

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/20190909/be16ba42/attachment.htm>

More information about the notifications mailing list