Commit 0aca55425ffb0ff1b7482f2b2e0cb3107efadb3e
1 parent
46dbc23c
Exists in
master
and in
1 other branch
Fixing code scanning alerts.
Showing
2 changed files
with
5 additions
and
2 deletions
Show diff stats
src/filetransfer/v3270ftprogress.c
... | ... | @@ -485,7 +485,9 @@ void v3270ftprogress_update(GtkWidget *widget, unsigned long current, unsigned l |
485 | 485 | char buffer[40]; |
486 | 486 | double seconds = ((double) remaining) / kbytes_sec; |
487 | 487 | time_t eta = time(0) + ((time_t) seconds); |
488 | - strftime(buffer, 39, "%H:%M:%S", localtime(&eta)); | |
488 | + struct tm tm; | |
489 | + | |
490 | + strftime(buffer, 39, "%H:%M:%S", localtime_r(&eta,&tm)); | |
489 | 491 | |
490 | 492 | gtk_entry_set_text(dialog->info[PROGRESS_FIELD_ETA],buffer); |
491 | 493 | ... | ... |
src/filetransfer/worker.c
... | ... | @@ -455,7 +455,8 @@ |
455 | 455 | char buffer[40]; |
456 | 456 | double seconds = ((double) remaining) / update->kbytes_sec; |
457 | 457 | time_t eta = time(NULL) + ((time_t) seconds); |
458 | - strftime(buffer, 39, "%H:%M:%S", localtime(&eta)); | |
458 | + struct tm tm; | |
459 | + strftime(buffer, 39, "%H:%M:%S", localtime_r(&eta,&tm)); | |
459 | 460 | |
460 | 461 | gtk_entry_set_text(update->worker->field[PROGRESS_FIELD_ETA],buffer); |
461 | 462 | ... | ... |