Skip to content

Commit

Permalink
Fix potential null pointer dereferences in HLSRingBuffer::SanitizeStr…
Browse files Browse the repository at this point in the history
…eams.
  • Loading branch information
linuxdude42 committed Jul 12, 2023
1 parent cbf1baa commit 0a5d42e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mythtv/libs/libmythtv/HLS/httplivestreambuffer.cpp
Expand Up @@ -2455,6 +2455,8 @@ void HLSRingBuffer::SanitizeStreams(StreamsList *streams)
for (int n = streams->size() - 1 ; n >= 0; n--)
{
HLSStream *hls = GetStream(n, streams);
if (hls == nullptr)
continue;
if (hls->NumSegments() == 0)
{
streams->removeAt(n);
Expand All @@ -2477,6 +2479,8 @@ void HLSRingBuffer::SanitizeStreams(StreamsList *streams)
for (int n = 0; n < streams->size(); n++)
{
HLSStream *hls = GetStream(n, streams);
if (hls == nullptr)
continue;
int id = hls->Id();
int seq = hls->StartSequence();
int newstart= idstart.value(id);
Expand Down

0 comments on commit 0a5d42e

Please sign in to comment.