Skip to content
Snippets Groups Projects
Commit e35bcb68 authored by Ken Bannister's avatar Ken Bannister
Browse files

net/nanocoap: fix remaining space calculation

The space calculation must use the same length as the eventual
return value.
parent e1bebed5
No related branches found
No related tags found
No related merge requests found
......@@ -364,7 +364,7 @@ ssize_t coap_build_reply(coap_pkt_t *pkt, unsigned code,
unsigned tkl = coap_get_token_len(pkt);
unsigned len = sizeof(coap_hdr_t) + tkl;
if ((len + payload_len + 1) > rlen) {
if ((len + payload_len) > rlen) {
return -ENOSPC;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment