Skip to content

Commit

Permalink
crypto: use correct length in memset()
Browse files Browse the repository at this point in the history
  • Loading branch information
mscdex committed Nov 6, 2020
1 parent 249a48c commit fc68995
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/protocol/crypto/src/binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1702,7 +1702,7 @@ class GenericDecipher : public ObjectWrap {

int outlen;
unsigned char calc_mac[hmac_len_];
memset(calc_mac, 0, sizeof calc_mac);
memset(calc_mac, 0, hmac_len_);

uint8_t seqbuf[4] = {0};
((uint8_t*)(seqbuf))[0] = (seqno >> 24) & 0xff;
Expand Down

0 comments on commit fc68995

Please sign in to comment.