From 8248d2fe9f5ab9367f5306b98c6336811b3945e6 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Fri, 27 Dec 2019 23:58:57 +0100 Subject: [PATCH] [scan] Fix access violation if pls line has no '=' --- src/library/filescanner_playlist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/library/filescanner_playlist.c b/src/library/filescanner_playlist.c index 554523e7..a94148f9 100644 --- a/src/library/filescanner_playlist.c +++ b/src/library/filescanner_playlist.c @@ -327,8 +327,8 @@ scan_playlist(const char *file, time_t mtime, int dir_id) /* For pls files we are only interested in the part after the FileX= entry */ path = NULL; - if ((pl_format == PLAYLIST_PLS) && (strncasecmp(buf, "file", strlen("file")) == 0)) - path = strchr(buf, '=') + 1; + if ((pl_format == PLAYLIST_PLS) && (strncasecmp(buf, "file", strlen("file")) == 0) && (path = strchr(buf, '='))) + path++; else if (pl_format == PLAYLIST_M3U) path = buf;