X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/d1e450f95a9b79b144a00dcf0f9356ff6cb9bfb2..612e765ceb09fce886ffc02120f039f7d880048f:/lib/dvb/radiotext.cpp diff --git a/lib/dvb/radiotext.cpp b/lib/dvb/radiotext.cpp index eff40e92..3e057194 100644 --- a/lib/dvb/radiotext.cpp +++ b/lib/dvb/radiotext.cpp @@ -562,14 +562,20 @@ inline void eDVBRdsDecoder::gotAncillaryData(__u8 *buf, int len) rtp_len[1] = 0x1f & rtp_buf[4]; unsigned char rtplus_osd_tmp[64]; - - memcpy(rtp_item[rtp_typ[0]],lastmessage+rtp_start[0],rtp_len[0]+1); - rtp_item[rtp_typ[0]][rtp_len[0]+1]=0; + + if (rtp_start[0] < 66 && (rtp_len[0]+rtp_start[0]) < 66) + { + memcpy(rtp_item[rtp_typ[0]],lastmessage+rtp_start[0],rtp_len[0]+1); + rtp_item[rtp_typ[0]][rtp_len[0]+1]=0; + } if (rtp_typ[0] != rtp_typ[1]) { - memcpy(rtp_item[rtp_typ[1]],lastmessage+rtp_start[1],rtp_len[1]+1); - rtp_item[rtp_typ[1]][rtp_len[1]+1]=0; + if (rtp_start[1] < 66 && (rtp_len[1]+rtp_start[1]) < 66) + { + memcpy(rtp_item[rtp_typ[1]],lastmessage+rtp_start[1],rtp_len[1]+1); + rtp_item[rtp_typ[1]][rtp_len[1]+1]=0; + } } // main RTPlus item_types used by the radio stations: