Message ID | CAB0OVGqvAvA_Zz=DwFWS9DcCZF18FW56Te12qPJuHyDW5J1KiQ@mail.gmail.com |
---|---|
State | Superseded |
Headers | show |
On Thu, Feb 07, 2019 at 14:40:40 +0100, Carl Eugen Hoyos wrote: > + if (p[0] < 0x20) { > + p++; > + if (--len < 0) > + return NULL; > + } If I understand section "A.2 Selection of character table" of ETSI EN 300 468 correctly, you need to drop an additional byte if the first byte (p[0]) is 0x1F, or an additional two bytes if the first one is 0x10. Cheers, Moritz
From 6a26ae786194275242de8870d2de3dad6c740405 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos <ceffmpeg@gmail.com> Date: Thu, 7 Feb 2019 14:37:48 +0100 Subject: [PATCH] lavf/mpegts: Do not print the character coding as part of service name. Fixes ticket #6320. --- libavformat/mpegts.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index b04fd7b..18130aa 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -674,6 +674,11 @@ static char *getstr8(const uint8_t **pp, const uint8_t *p_end) return NULL; if (len > p_end - p) return NULL; + if (p[0] < 0x20) { + p++; + if (--len < 0) + return NULL; + } str = av_malloc(len + 1); if (!str) return NULL; -- 1.7.10.4