mirror of
https://github.com/obgm/libcoap.git
synced 2026-12-05 20:02:19 +03:00
coap_net.c: Include MID check in coap_pdu_cksum()
This commit is contained in:
1 parent
da534de75e
commit
b47c82535c
1 file changed
+3
@@ -1829,6 +1829,9 @@ coap_pdu_cksum(const coap_pdu_t *pdu, coap_digest_t *digest_buffer) {
|
||||
if (!coap_digest_update(digest_ctx, (const uint8_t *)&pdu->code, sizeof(pdu->code))) {
|
||||
goto fail;
|
||||
}
|
||||
if (!coap_digest_update(digest_ctx, (const uint8_t *)&pdu->mid, sizeof(pdu->mid))) {
|
||||
goto fail;
|
||||
}
|
||||
if (!coap_digest_final(digest_ctx, digest_buffer))
|
||||
return 0;
|
||||
|
||||
|
||||
Reference in new issue
Block a user