From 95aaed5e566e6cda2ada55d1bd7bd5a9a17311ab Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Thu, 24 Feb 2022 01:37:36 +0100 Subject: Add static analysis via flawfinder(1) --- uri.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'uri.c') diff --git a/uri.c b/uri.c index 3cbc1d6..6d3755a 100644 --- a/uri.c +++ b/uri.c @@ -20,11 +20,13 @@ badwolf_ensure_uri_scheme(const gchar *text, gboolean try_file) if(try_file) { + /* flawfinder: ignore. `path` is allocated by realpath itself */ path = realpath(text, NULL); gchar *f = NULL; if(path != NULL) { + /* flawfinder: ignore. only used as presence check, no way to pass file descriptor */ if(access(path, R_OK) == 0) { f = g_strdup_printf("file://%s", path); -- cgit v1.3.1-23-gd82d