From ce6fbe4382ea9abfb67d1343814b6772a9a6f7ab Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Sun, 2 Jun 2024 21:48:00 -0400 Subject: [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 --- apps/cuesheet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apps') 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 if (strlcat(cuepath, slash, MAX_PATH) >= MAX_PATH) goto skip; /* overflow */ dot = strrchr(cuepath, '.'); - strcpy(dot, ".cue"); + if (dot) + strcpy(dot, ".cue"); if (!file_exists(cuepath)) { skip: -- cgit v1.2.3