Opened 2 years ago

Closed 19 months ago

#13440 closed Bug Report - General (Invalid)

Uninitialized variable in HLSRingBuffer::ParseM3U8

Reported by: David Hampton Owned by: cpinkham
Priority: minor Milestone: 30.1
Component: MythTV - HTTP Streaming Version: v30-fixes
Severity: medium Keywords:
Cc: Ticket locked: no


The code uses an uninitialized variable while parsing the #EXT-X-VERSION tag. It creates a new variable 'version2' without assigning a value, and then passes that variable to two functions.

Change History (2)

comment:1 Changed 19 months ago by Mac Michaels

Please close this ticket as this is not a bug.

This is the code in question:

 else if (line.startsWith(QLatin1String("#EXT-X-VERSION")))
                int version2;
                if (!M3U::ParseVersion(line, StreamURL(), version2))
                    return false;

It does not need an initial value for version2 since version2 is passed by reference (see header file mythtv/mythtv/libs/libmythtv/HLS/m3u.h ):

bool ParseVersion(const QString& line, const QString& loc, int& version);

Variable version 2 is always set by ParseVersion unless it returns false, then SetVersion is not called.

This is not a bug.

comment:2 Changed 19 months ago by David Hampton

Resolution: Invalid
Status: newclosed
Note: See TracTickets for help on using tickets.