summaryrefslogtreecommitdiff
path: root/libsi/si.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2012-09-29 14:44:20 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2012-09-29 14:44:20 +0200
commit3cc12a401a865361856d6c42d5b979d43be15973 (patch)
treef97b1172aff700901a7952b0592964b0b961eca9 /libsi/si.c
parent3c860ee0439bf106413a759c284de616d31da638 (diff)
downloadvdr-3cc12a401a865361856d6c42d5b979d43be15973.tar.gz
vdr-3cc12a401a865361856d6c42d5b979d43be15973.tar.bz2
Added missing decrementing of 'len' in libsi/si.c's String::decodeText() functions
Diffstat (limited to 'libsi/si.c')
-rw-r--r--libsi/si.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libsi/si.c b/libsi/si.c
index cd889bcd..80d34d14 100644
--- a/libsi/si.c
+++ b/libsi/si.c
@@ -6,7 +6,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: si.c 2.7 2012/08/21 08:10:00 kls Exp $
+ * $Id: si.c 2.8 2012/09/29 14:44:20 kls Exp $
* *
***************************************************************************/
@@ -454,6 +454,7 @@ void String::decodeText(char *buffer, int size) {
}
if (l == 2 && Move) {
memmove(p, p + 1, len - 1); // we also copy the terminating 0!
+ len -= 1;
l = 1;
}
}
@@ -480,6 +481,7 @@ void String::decodeText(char *buffer, char *shortVersion, int sizeBuffer, int si
if (*p == 0x86 || *p == 0x87) {
IsShortName += (*p == 0x86) ? 1 : -1;
memmove(to, to + l, len - l + 1); // we also copy the terminating 0!
+ len -= l;
l = 0;
}
if (l && IsShortName) {