1
0
Fork 0
forked from len0rd/rockbox

[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
This commit is contained in:
William Wilgus 2024-06-02 21:48:00 -04:00
parent f4a044e561
commit ce6fbe4382

View file

@ -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: