summaryrefslogtreecommitdiff
path: root/lib/str.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/str.c')
-rw-r--r--lib/str.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/str.c b/lib/str.c
index 6b5f49ca89..7a04c78985 100644
--- a/lib/str.c
+++ b/lib/str.c
@@ -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;
}