aboutsummaryrefslogtreecommitdiff
path: root/lib/dvb/radiotext.cpp
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2007-11-08 23:17:10 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2007-11-08 23:17:10 +0000
commit80f0ae4f5b0e4b8d5b8170512b2f9c5071edfcb2 (patch)
treead30486f250686aaabde56e72aa1f9251338d21d /lib/dvb/radiotext.cpp
parentce41b5f99debfbe9b1b639fa1929dd5215fd9b1b (diff)
downloadenigma2-80f0ae4f5b0e4b8d5b8170512b2f9c5071edfcb2.tar.gz
enigma2-80f0ae4f5b0e4b8d5b8170512b2f9c5071edfcb2.zip
more robust rtp plus tag parsing
Diffstat (limited to 'lib/dvb/radiotext.cpp')
-rw-r--r--lib/dvb/radiotext.cpp16
1 files changed, 11 insertions, 5 deletions
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: