diff options
Diffstat (limited to 'controller/fw/tools/crypto_test.c')
-rw-r--r-- | controller/fw/tools/crypto_test.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/controller/fw/tools/crypto_test.c b/controller/fw/tools/crypto_test.c index 8552117..410fac2 100644 --- a/controller/fw/tools/crypto_test.c +++ b/controller/fw/tools/crypto_test.c @@ -30,7 +30,7 @@ int main(int argc, char **argv) { uint8_t auth_key[16]; - for (size_t i=0; argv[1][i+0] != '\0' && argv[1][i+1] != '\0'; i+= 2) { + for (size_t i=0; argv[1][i+0] != '\0' && argv[1][i+1] != '\0' && i/2<sizeof(auth_key); i+= 2) { char buf[3] = { argv[1][i+0], argv[1][i+1], 0}; char *endptr; auth_key[i/2] = strtoul(buf, &endptr, 16); |