diff options
Diffstat (limited to 'unittest')
-rw-r--r-- | unittest/test_HOTP.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/unittest/test_HOTP.cc b/unittest/test_HOTP.cc index 520faaf..c13fb8e 100644 --- a/unittest/test_HOTP.cc +++ b/unittest/test_HOTP.cc @@ -36,7 +36,8 @@ using namespace nitrokey::misc; void hexStringToByte(uint8_t data[], const char* hexString){ REQUIRE(strlen(hexString)%2==0); - char buf[2]; + char buf[3]; + buf[2] = '\0'; for(int i=0; i<strlen(hexString); i++){ buf[i%2] = hexString[i]; if (i%2==1){ |