From: Jaroslav Kysela Date: Sun, 18 Jun 2017 18:44:57 +0000 (+0200) Subject: dvb_get_string - fix the null string (provider), fixes #4339 X-Git-Tag: v4.2.3~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8f31e92ca9af86b846b370da3efb03e8cf16ac9;p=thirdparty%2Ftvheadend.git dvb_get_string - fix the null string (provider), fixes #4339 --- diff --git a/src/input/mpegts/dvb_support.c b/src/input/mpegts/dvb_support.c index cde6bb024..95fbf441d 100644 --- a/src/input/mpegts/dvb_support.c +++ b/src/input/mpegts/dvb_support.c @@ -280,7 +280,8 @@ dvb_get_string // automatic charset detection switch(src[0]) { case 0: - return -1; + *dst = 0; // empty string (confirmed!) + return 0; case 0x01 ... 0x0b: if (auto_pl_charset && (src[0] + 4) == 5) @@ -365,9 +366,8 @@ dvb_get_string outlen = dstlen - 1; - if (dvb_convert(ic, src, srclen, dst, &outlen) == -1) { + if (dvb_convert(ic, src, srclen, dst, &outlen) == -1) return -1; - } len = dstlen - outlen - 1; dst[len] = 0;