diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2018-04-10 08:00:14 +0200 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2018-04-10 08:00:14 +0200 |
commit | 320dee676971f7116f9e28d759e4feb0a36729a4 (patch) | |
tree | fc2ab4ee7ac556d052c7dc9a52959497b0291fdd /unittest/test_HOTP.cc | |
parent | f9f89587026cd22115f06c216e2d69c4142c7060 (diff) | |
parent | 2f7b58abcee6ef32a927b3bd43070bbea205656b (diff) | |
download | libnitrokey-320dee676971f7116f9e28d759e4feb0a36729a4.tar.gz libnitrokey-320dee676971f7116f9e28d759e4feb0a36729a4.tar.bz2 |
Merge branch 'pr_104'
Fixes #104
Diffstat (limited to 'unittest/test_HOTP.cc')
-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){ |