mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 17:01:08 +02:00
src/gui/movieplayer.cpp fix possible stack-buffer-overflow
Origin commit data
------------------
Branch: ni/coolstream
Commit: 0857bf579a
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2016-03-01 (Tue, 01 Mar 2016)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -2307,12 +2307,13 @@ void CMoviePlayerGui::parsePlaylist(CFile *file)
|
||||
while (infile.good())
|
||||
{
|
||||
infile.getline(cLine, sizeof(cLine));
|
||||
if (cLine[strlen(cLine)-1]=='\r')
|
||||
cLine[strlen(cLine)-1]=0;
|
||||
size_t len = strlen(cLine);
|
||||
if (len > 0 && cLine[len-1]=='\r')
|
||||
cLine[len-1]=0;
|
||||
|
||||
int dur;
|
||||
sscanf(cLine, "#EXTINF:%d,%[^\n]\n", &dur, name);
|
||||
if (strlen(cLine) > 0 && cLine[0]!='#')
|
||||
if (len > 0 && cLine[0]!='#')
|
||||
{
|
||||
char *url = NULL;
|
||||
if ((url = strstr(cLine, "http://")) || (url = strstr(cLine, "https://")) || (url = strstr(cLine, "rtmp://")) || (url = strstr(cLine, "rtsp://")) || (url = strstr(cLine, "mmsh://")) ) {
|
||||
|
Reference in New Issue
Block a user