<p><b>@smlng</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/RIOT-OS/RIOT/pull/12074#discussion_r321682908">sys/net/application_layer/nanocoap/nanocoap.c</a>:</p>
<pre style='color:#555'>>   */
 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))) {
</pre>
<p>and hence we don't need the extra check verifying <code>pkt_pos + 1 == hdr_end</code></p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/12074?email_source=notifications&email_token=ABE7WYG5GNHDRCIJSE6JZX3QIIZSVA5CNFSM4IPGBY3KYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCD4Z2PY#discussion_r321682908">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYCLV4LKM2PNT4E7XQLQIIZSVANCNFSM4IPGBY3A">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABE7WYGOPREDRCXD7FHPYPDQIIZSVA5CNFSM4IPGBY3KYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCD4Z2PY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/12074?email_source=notifications\u0026email_token=ABE7WYG5GNHDRCIJSE6JZX3QIIZSVA5CNFSM4IPGBY3KYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCD4Z2PY#discussion_r321682908",
"url": "https://github.com/RIOT-OS/RIOT/pull/12074?email_source=notifications\u0026email_token=ABE7WYG5GNHDRCIJSE6JZX3QIIZSVA5CNFSM4IPGBY3KYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCD4Z2PY#discussion_r321682908",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>