Summary Files Commits Branches @commit @diff @stats
path: root / uri.c
diff options
context:
space:
mode:
Commit95aaed5e566e6cda2ada55d1bd7bd5a9a17311ab (patch)
Author
 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
2022-02-24 01:37:36 +0100
Committer
 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
2022-02-26 13:55:34 +0100
Files89147a93dc4f65a8dec7dfa59ce24ee7c98b811a /uri.c
goodwolf-95aaed5e566e6cda2ada55d1bd7bd5a9a17311ab.tar
goodwolf-95aaed5e566e6cda2ada55d1bd7bd5a9a17311ab.tar.gz
goodwolf-95aaed5e566e6cda2ada55d1bd7bd5a9a17311ab.zip
Parent495d4089eecf0a4c369b302c9e42dee531471c41 (diff)
Add static analysis via flawfinder(1)
1 files changed, 2 insertions, 0 deletions
-rw-r--r--uri.c2
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);