summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2024-06-02 21:48:00 -0400
committerWilliam Wilgus <wilgus.william@gmail.com>2024-06-02 21:48:00 -0400
commitce6fbe4382ea9abfb67d1343814b6772a9a6f7ab (patch)
tree356a7bfdeb7d453acf02b5ffb7894fe26e8e973f /apps
parentf4a044e56110d03cc581c3be89be3117f76c90b0 (diff)
downloadrockbox-ce6fbe4382ea9abfb67d1343814b6772a9a6f7ab.tar.gz
rockbox-ce6fbe4382ea9abfb67d1343814b6772a9a6f7ab.zip
[coverity] cuesheet.c search_for_cursheet() if no dot strcpy to NULL
the logic here is a bit fuzzy to me maybe one of the copies to the cuepath buffer adds a dot but I don't see anything explicit Change-Id: Idcc469b5d04e4d9125b36df53d6aaa32a10f3bfd
Diffstat (limited to 'apps')
-rw-r--r--apps/cuesheet.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/cuesheet.c b/apps/cuesheet.c
index bbdc93746e..2fe24d0a40 100644
--- a/apps/cuesheet.c
+++ b/apps/cuesheet.c
@@ -66,7 +66,8 @@ static bool search_for_cuesheet(const char *path, struct cuesheet_file *cue_file
66 if (strlcat(cuepath, slash, MAX_PATH) >= MAX_PATH) 66 if (strlcat(cuepath, slash, MAX_PATH) >= MAX_PATH)
67 goto skip; /* overflow */ 67 goto skip; /* overflow */
68 dot = strrchr(cuepath, '.'); 68 dot = strrchr(cuepath, '.');
69 strcpy(dot, ".cue"); 69 if (dot)
70 strcpy(dot, ".cue");
70 if (!file_exists(cuepath)) 71 if (!file_exists(cuepath))
71 { 72 {
72skip: 73skip: