Skip to content

Commit

Permalink
Merge pull request #107 from ieei0214/fix_issue_105
Browse files Browse the repository at this point in the history
Fix for issue #105: memory overwrite in message_send.
  • Loading branch information
dnav committed Mar 10, 2016
2 parents 17e6e34 + 34191e2 commit 78a6d52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/er-coap-13/er-coap-13.c
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ size_t coap_serialize_get_size(void *packet)
coap_packet_t *const coap_pkt = (coap_packet_t *) packet;
size_t length = 0;

length = COAP_HEADER_LEN + coap_pkt->payload_len;
length = COAP_HEADER_LEN + coap_pkt->payload_len + coap_pkt->token_len;

if (IS_OPTION(coap_pkt, COAP_OPTION_IF_MATCH))
{
Expand Down

0 comments on commit 78a6d52

Please sign in to comment.