mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 01:11:06 +02:00
audioplayer: avoid out-of-bounds access
Origin commit data
------------------
Commit: 6148b976aa
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-05-24 (Fri, 24 May 2013)
This commit is contained in:
@@ -1343,13 +1343,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"))
|
||||
|
Reference in New Issue
Block a user