mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Added missing decrementing of 'len' in libsi/si.c's String::decodeText() functions
This commit is contained in:
parent
3c860ee043
commit
3cc12a401a
1
HISTORY
1
HISTORY
@ -7263,3 +7263,4 @@ Video Disk Recorder Revision History
|
|||||||
Sören Moch).
|
Sören Moch).
|
||||||
- Fixed sorting folders before recordings in case of UTF-8 (thanks to Sören Moch).
|
- Fixed sorting folders before recordings in case of UTF-8 (thanks to Sören Moch).
|
||||||
- Reactivated stripping control characters from EPG texts and adapted it to UTF-8.
|
- Reactivated stripping control characters from EPG texts and adapted it to UTF-8.
|
||||||
|
- Added missing decrementing of 'len' in libsi/si.c's String::decodeText() functions.
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or *
|
* the Free Software Foundation; either version 2 of the License, or *
|
||||||
* (at your option) any later version. *
|
* (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) {
|
if (l == 2 && Move) {
|
||||||
memmove(p, p + 1, len - 1); // we also copy the terminating 0!
|
memmove(p, p + 1, len - 1); // we also copy the terminating 0!
|
||||||
|
len -= 1;
|
||||||
l = 1;
|
l = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -480,6 +481,7 @@ void String::decodeText(char *buffer, char *shortVersion, int sizeBuffer, int si
|
|||||||
if (*p == 0x86 || *p == 0x87) {
|
if (*p == 0x86 || *p == 0x87) {
|
||||||
IsShortName += (*p == 0x86) ? 1 : -1;
|
IsShortName += (*p == 0x86) ? 1 : -1;
|
||||||
memmove(to, to + l, len - l + 1); // we also copy the terminating 0!
|
memmove(to, to + l, len - l + 1); // we also copy the terminating 0!
|
||||||
|
len -= l;
|
||||||
l = 0;
|
l = 0;
|
||||||
}
|
}
|
||||||
if (l && IsShortName) {
|
if (l && IsShortName) {
|
||||||
|
Loading…
Reference in New Issue
Block a user