fix ‘sprintf’ output between 15 and 19 bytes into a destination of size 18

This commit is contained in:
Philippe Teuwen 2019-03-10 00:24:26 +01:00
parent 22b43c65ec
commit 48124f89b4

View file

@ -171,7 +171,7 @@ crack_states_thread(void *x)
__atomic_fetch_add(&found_bs_key, key, __ATOMIC_SEQ_CST);
char progress_text[80];
char keystr[18];
char keystr[19];
sprintf(keystr, "%012" PRIx64 " ", key);
sprintf(progress_text, "Brute force phase completed. Key found: " _YELLOW_( % s), keystr);
hardnested_print_progress(thread_arg->num_acquired_nonces, progress_text, 0.0, 0);