audioplayer: avoid out-of-bounds access

Origin commit data
------------------
Branch: ni/coolstream
Commit: ca3e06b3fc
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-05-24 (Fri, 24 May 2013)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2013-05-24 16:58:59 +02:00
committed by Jacek Jendrzej
parent 44f7b6a0c9
commit 08df105092

View File

@@ -1346,13 +1346,13 @@ bool CAudioPlayerGui::openFilebrowser(void)
while (infile.good())
{
infile.getline(cLine, 255);
// remove CR
if (cLine[strlen(cLine)-1]=='\r')
cLine[strlen(cLine)-1]=0;
int duration;
sscanf(cLine, "#EXTINF:%d,%[^\n]\n", &duration, name);
if (strlen(cLine) > 0 && cLine[0]!='#')
{
// remove CR
if (cLine[strlen(cLine)-1]=='\r')
cLine[strlen(cLine)-1]=0;
char *url = strstr(cLine, "http://");
if (url != NULL) {
if (strstr(url, ".m3u") || strstr(url, ".pls"))