diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2015-09-14 21:32:05 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2015-09-14 21:32:05 +0200 |
commit | 1788b331d6a1af2a16d001fa5dc111c4f0a144e2 (patch) | |
tree | 8377dd9f5dacaeb2e74b9bbc62d1d64fdb1a8e27 /lib | |
parent | 2b8fcfdde0040a93d097bb8ff48c200f11aede13 (diff) | |
download | gnutls-1788b331d6a1af2a16d001fa5dc111c4f0a144e2.tar.gz |
_gnutls_hex2bin: avoid overrun in the provided buffer
Diffstat (limited to 'lib')
-rw-r--r-- | lib/str.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -508,8 +508,7 @@ _gnutls_hex2bin(const char *hex_data, size_t hex_size, uint8_t * bin_data, i++; continue; } - - if (j > *bin_size) { + if (j >= *bin_size) { gnutls_assert(); return GNUTLS_E_SHORT_MEMORY_BUFFER; } |