coverity #373452 - tainted value

This commit is contained in:
iceman1001 2022-01-29 10:39:49 +01:00
parent 4db1627e1d
commit 3df14034fe

View file

@ -107,7 +107,7 @@ int main (int argc, char* argv[]) {
uint8_t tag_challenge[16] = {0x00};
uint8_t lock_challenge[32] = {0x00};
int timestamp = atoi(argv[1]);
uint64_t timestamp = atoi(argv[1]);
if (argc != 4) {
printf("\nusage: %s <unix timestamp> <16 byte tag challenge> <32 byte lock challenge>\n\n", argv[0]);
@ -120,7 +120,7 @@ int main (int argc, char* argv[]) {
if(hexstr_to_byte_array(argv[3], lock_challenge, sizeof(lock_challenge)))
return 3;
int start_time = time(NULL);
uint64_t start_time = time(NULL);
for (; timestamp < start_time; timestamp++) {