[riot-notifications] [RIOT-OS/RIOT] net/nanocoap: Packet API return error if buffer full (#10931)

Ken Bannister notifications at github.com
Mon Mar 18 18:01:42 CET 2019

kb2ma commented on this pull request.

>      uint16_t lastonum = (pkt->options_len)
             ? pkt->options[pkt->options_len - 1].opt_num : 0;
     assert(optnum >= lastonum);
+    if (pkt->options_len >= NANOCOAP_NOPTS_MAX) {

I believe I wanted to handle the assert first, but it's not a problem to move up.

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/20190318/5a50d3f2/attachment-0001.html>

More information about the notifications mailing list