Ticket #5449: libs_libmythtv_mpegrecorder.h-prevent-overrun-of-_pid_status.patch

File libs_libmythtv_mpegrecorder.h-prevent-overrun-of-_pid_status.patch, 912 bytes (added by Erik Hovland <erik@…>, 11 years ago)

Adds one more to the arrays _stream_id, _pid_status and _continuity_count

  • libs/libmythtv/mpegrecorder.h

    The array _pid_status should have enough room for the 'null' pid since it is possible for that pid to come through the system.
    
    From: Erik Hovland <erik@hovland.org>
    
    
    ---
    
     libs/libmythtv/mpegrecorder.h |    6 +++---
     1 files changed, 3 insertions(+), 3 deletions(-)
    
    diff --git a/libs/libmythtv/mpegrecorder.h b/libs/libmythtv/mpegrecorder.h
    index 485f780..3782d00 100644
    a b class MpegRecorder : public DTVRecorder, 
    109109
    110110    // TS
    111111    MPEGStreamData *_stream_data;
    112     unsigned char   _stream_id[0x1fff];
    113     unsigned char   _pid_status[0x1fff];
    114     unsigned char   _continuity_counter[0x1fff];
     112    unsigned char   _stream_id[0x1fff  + 1];
     113    unsigned char   _pid_status[0x1fff + 1];
     114    unsigned char   _continuity_counter[0x1fff + 1];
    115115    static const unsigned char kPayloadStartSeen = 0x2;
    116116
    117117    // Statistics