mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed handling newline characters in ci.c's CopyString()
This commit is contained in:
parent
121f348379
commit
b4a6c36215
@ -2762,6 +2762,7 @@ Winfried K
|
|||||||
for fixing the size of cChannel::dtypes[]
|
for fixing the size of cChannel::dtypes[]
|
||||||
for adding a device hook for detecting whether a device provides EIT data
|
for adding a device hook for detecting whether a device provides EIT data
|
||||||
for improving deleting plugins in case the plugin uses its own memory management
|
for improving deleting plugins in case the plugin uses its own memory management
|
||||||
|
for reporting a bug in handling newline characters in ci.c's CopyString()
|
||||||
|
|
||||||
Hans-Werner Hilse <hilse@web.de>
|
Hans-Werner Hilse <hilse@web.de>
|
||||||
for adding the command line option --userdump to enable core dumps in case VDR
|
for adding the command line option --userdump to enable core dumps in case VDR
|
||||||
|
3
HISTORY
3
HISTORY
@ -9513,6 +9513,7 @@ Video Disk Recorder Revision History
|
|||||||
with the main menu open.
|
with the main menu open.
|
||||||
- Official release.
|
- Official release.
|
||||||
|
|
||||||
2020-08-16:
|
2020-08-17:
|
||||||
|
|
||||||
- Updated the Italian OSD texts (thanks to Diego Pierotto).
|
- Updated the Italian OSD texts (thanks to Diego Pierotto).
|
||||||
|
- Fixed handling newline characters in ci.c's CopyString() (reported by Winfried Köhler).
|
||||||
|
4
ci.c
4
ci.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: ci.c 4.31 2020/07/10 09:06:21 kls Exp $
|
* $Id: ci.c 4.32 2020/08/17 10:26:18 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ci.h"
|
#include "ci.h"
|
||||||
@ -81,7 +81,7 @@ static char *CopyString(int Length, const uint8_t *Data)
|
|||||||
char *s = MALLOC(char, Length + 1);
|
char *s = MALLOC(char, Length + 1);
|
||||||
char *p = s;
|
char *p = s;
|
||||||
while (Length > 0) {
|
while (Length > 0) {
|
||||||
char c = *Data;
|
int c = *Data;
|
||||||
if (isprint(c)) // some CAMs send funny characters in their strings, let's just skip them
|
if (isprint(c)) // some CAMs send funny characters in their strings, let's just skip them
|
||||||
*p++ = c;
|
*p++ = c;
|
||||||
else if (c == 0x8A) // the character 0x8A is used as newline, so let's put a real '\n' in there
|
else if (c == 0x8A) // the character 0x8A is used as newline, so let's put a real '\n' in there
|
||||||
|
Loading…
Reference in New Issue
Block a user