[mythtv] Invalid pointer de-ref in NuppelVideoRecorder.cpp

David Hampton mythtv at love2code.net
Tue Dec 3 06:36:59 UTC 2019


Hi Mark,

The clang-tidy  program is spitting out a possible null-pointer de-
reference in NuppelVideoRecorder.cpp, function BufferIt, line 1846.

    memcpy(videobuffer[act]->buffer, buf, len);

Its complaining about the "buf" variable.  Backing up, this is called
from DoV4L2() on line 1567 or line 1577, which both pass the
output_buffer variable to BufferIt.

     BufferIt(output_buffer, m_video_buffer_size);

Backing up a little further, the output_buffer pointer is assigned at
line 1438 inside of an "if" statement, a conditional that doesn't
control the calls to BufferIt.  If this conditional is false,
output_buffer is never assigned, and is still nullptr when passed to
BufferIt.

This is in master, updated today.

David




More information about the mythtv-dev mailing list