diff options
| author | Klaus Schmidinger <vdr@tvdr.de> | 2009-08-16 13:21:07 +0200 | 
|---|---|---|
| committer | Klaus Schmidinger <vdr@tvdr.de> | 2009-08-16 13:21:07 +0200 | 
| commit | be3ea311192a736b14729570183b65986f6d0522 (patch) | |
| tree | a7c1862070f4703cedbc4aae72d6746675ed06a9 | |
| parent | 99468a776ddd1870ac9aa0e306256c0b3080ff0f (diff) | |
| download | vdr-be3ea311192a736b14729570183b65986f6d0522.tar.gz vdr-be3ea311192a736b14729570183b65986f6d0522.tar.bz2 | |
Fixed handling QUERY
| -rw-r--r-- | ci.c | 11 | 
1 files changed, 6 insertions, 5 deletions
| @@ -4,7 +4,7 @@   * See the main source file 'vdr.c' for copyright information and   * how to reach the author.   * - * $Id: ci.c 2.2 2009/08/15 11:16:27 kls Exp $ + * $Id: ci.c 2.3 2009/08/16 13:21:07 kls Exp $   */  #include "ci.h" @@ -610,7 +610,8 @@ cCiCaPmt::cCiCaPmt(uint8_t CmdId, int Source, int Transponder, int ProgramNumber    capmt[length++] = 0x01; // version_number, current_next_indicator - apparently vn doesn't matter, but cni must be 1    esInfoLengthPos = length;    capmt[length++] = 0x00; // program_info_length H (at program level) -  capmt[length++] = 0x00; // program_info_length L +  capmt[length++] = 0x01; // program_info_length L +  capmt[length++] = cmdId;    if (caDescriptorsLength > 0)       AddCaDescriptors(caDescriptorsLength, caDescriptors);  } @@ -631,7 +632,8 @@ void cCiCaPmt::AddPid(int Pid, uint8_t StreamType)       capmt[length++] =  Pid       & 0xFF;       esInfoLengthPos = length;       capmt[length++] = 0x00; // ES_info_length H (at ES level) -     capmt[length++] = 0x00; // ES_info_length L +     capmt[length++] = 0x01; // ES_info_length L +     capmt[length++] = cmdId;       if (caDescriptorsLength > 0)          AddCaDescriptors(caDescriptorsLength, caDescriptors);       } @@ -640,8 +642,7 @@ void cCiCaPmt::AddPid(int Pid, uint8_t StreamType)  void cCiCaPmt::AddCaDescriptors(int Length, const uint8_t *Data)  {    if (esInfoLengthPos) { -     if (length + Length < int(sizeof(capmt))) { -        capmt[length++] = cmdId; +     if (length + Length <= int(sizeof(capmt))) {          memcpy(capmt + length, Data, Length);          length += Length;          int l = length - esInfoLengthPos - 2; | 
