diff options
Add static analysis via flawfinder(1)
1 files changed, 8 insertions, 1 deletions
| -rw-r--r-- | downloads.c | 9 |
diff --git a/downloads.c b/downloads.c index 4c54b95..ed6a533 100644 --- a/downloads.c +++ b/downloads.c @@ -19,8 +19,12 @@ download_stop_iconCb_clicked(GtkButton *stop_icon, gpointer user_data) } void -download_format_elapsed(char *formatted, size_t formatted_size, char *format, int total) +download_format_elapsed(char *restrict formatted, + size_t formatted_size, + char *restrict format, + int total) { + /* flawfinder: ignore, format string only passed by ourselves */ snprintf(formatted, formatted_size, format, @@ -107,6 +111,7 @@ void downloadCb_failed(WebKitDownload *webkit_download, GError *error, gpointer user_data) { struct Download *download = (struct Download *)user_data; + /* flawfinder: ignore. proper buffer limits are used */ char formatted[BUFSIZ]; int total = (int)webkit_download_get_elapsed_time(webkit_download); char *format; @@ -130,6 +135,7 @@ void downloadCb_finished(WebKitDownload *webkit_download, gpointer user_data) { struct Download *download = (struct Download *)user_data; + /* flawfinder: ignore. proper buffer limits are used */ char formatted[BUFSIZ]; int total = (int)webkit_download_get_elapsed_time(webkit_download); @@ -157,6 +163,7 @@ downloadCb_received_data(WebKitDownload *webkit_download, guint64 data_lenght, g { (void)data_lenght; struct Download *download = (struct Download *)user_data; + /* flawfinder: ignore. proper buffer limits are used */ char formatted[BUFSIZ]; int total = (int)webkit_download_get_elapsed_time(webkit_download); |