1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

sys/net/nanocoap: correctly initialize array

This commit is contained in:
Alexandre Abadie 2019-10-27 11:54:19 +01:00
parent 95da51bd7f
commit 8b06560c02
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405

View File

@ -784,7 +784,7 @@ static ssize_t _add_opt_pkt(coap_pkt_t *pkt, uint16_t optnum, const uint8_t *val
assert(optnum >= lastonum);
/* calculate option length */
uint8_t dummy[3];
uint8_t dummy[3] = { 0 };
size_t optlen = _put_delta_optlen(dummy, 1, 4, optnum - lastonum);
optlen += _put_delta_optlen(dummy, 0, 0, val_len);
optlen += val_len;