Skip to content
Permalink
Browse files

buffer overflow fix

  • Loading branch information
diogorac committed Oct 30, 2018
1 parent d7d87fa commit 1caa04189a8f36eb3753c693026bc905ca6ae284
Showing with 1 addition and 1 deletion.
  1. +1 −1 trezor-crypto/segwit_addr.c
@@ -97,7 +97,7 @@ int bech32_decode(char* hrp, uint8_t *data, size_t *data_len, const char *input)
++(*data_len);
}
hrp_len = input_len - (1 + *data_len);
if (hrp_len < 1 || *data_len < 6) {
if (1 + *data_len >= input_len || *data_len < 6) {
return 0;
}
*(data_len) -= 6;

0 comments on commit 1caa041

Please sign in to comment.
You can’t perform that action at this time.