aboutsummaryrefslogtreecommitdiffstats
path: root/src/codec
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-10-01 02:54:46 +0000
committerlloyd <[email protected]>2010-10-01 02:54:46 +0000
commitda67713c92db146beba76dcf3b46291b1b8141ae (patch)
tree5eb9883287eb19c273a1faa2ba99ef5581b93806 /src/codec
parentdf61bbc26af9d82a07bfee963a2e43eb66b9f597 (diff)
Handle memory overwrite if hex input was not byte wide
Diffstat (limited to 'src/codec')
-rw-r--r--src/codec/hex/hex.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codec/hex/hex.cpp b/src/codec/hex/hex.cpp
index 8efdd3ccd..0034de95a 100644
--- a/src/codec/hex/hex.cpp
+++ b/src/codec/hex/hex.cpp
@@ -168,7 +168,7 @@ SecureVector<byte> hex_decode(const char input[],
u32bit input_length,
bool ignore_ws)
{
- SecureVector<byte> bin(input_length / 2);
+ SecureVector<byte> bin(1 + input_length / 2);
u32bit written = hex_decode(&bin[0],
input,