From f040eed489c3b243079e906df3464f99ce64a598 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Wed, 5 Mar 2008 17:25:44 +0100 Subject: [PATCH] Fixed a signed character used as index in cBase64Encoder::NextLine() --- CONTRIBUTORS | 1 + HISTORY | 2 ++ tools.c | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 3d191dc5..8b589c88 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -2104,6 +2104,7 @@ Tobias Grimm for suggesting that the 'plugins' target in the Makefile should return an error exit code if one of the plugins failed to compile for making the non-breaking space symbol be rendered as a blank + for fixing a signed character used as index in cBase64Encoder::NextLine() Helge Lenz for reporting a bug in setting the 'Delta' parameter when calling the shutdown diff --git a/HISTORY b/HISTORY index 77d2c8f9..cf04b11b 100644 --- a/HISTORY +++ b/HISTORY @@ -5703,3 +5703,5 @@ Video Disk Recorder Revision History SI data on the Czech/Slovak channels, which actually do follow the standard). Users who want to set the default character set to something different can do wo through "export VDR_CHARSET_OVERRIDE=ISO-8859-9". +- Fixed a signed character used as index in cBase64Encoder::NextLine() (thanks + to Tobias Grimm). diff --git a/tools.c b/tools.c index e5bb40a9..70ccb0e3 100644 --- a/tools.c +++ b/tools.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: tools.c 1.144 2008/02/29 13:16:39 kls Exp $ + * $Id: tools.c 1.145 2008/03/05 17:23:47 kls Exp $ */ #include "tools.h" @@ -1102,7 +1102,7 @@ const char *cBase64Encoder::NextLine(void) int r = 0; while (i < length && r < maxResult - 3) { result[r++] = b64[(data[i] >> 2) & 0x3F]; - char c = (data[i] << 4) & 0x3F; + uchar c = (data[i] << 4) & 0x3F; if (++i < length) c |= (data[i] >> 4) & 0x0F; result[r++] = b64[c];