1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed a signed character used as index in cBase64Encoder::NextLine()

This commit is contained in:
Klaus Schmidinger 2008-03-05 17:25:44 +01:00
parent 620eb8150b
commit f040eed489
3 changed files with 5 additions and 2 deletions

View File

@ -2104,6 +2104,7 @@ Tobias Grimm <tobias.grimm@e-tobi.net>
for suggesting that the 'plugins' target in the Makefile should return an error exit for suggesting that the 'plugins' target in the Makefile should return an error exit
code if one of the plugins failed to compile code if one of the plugins failed to compile
for making the non-breaking space symbol be rendered as a blank 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 <h.lenz@gmx.de> Helge Lenz <h.lenz@gmx.de>
for reporting a bug in setting the 'Delta' parameter when calling the shutdown for reporting a bug in setting the 'Delta' parameter when calling the shutdown

View File

@ -5703,3 +5703,5 @@ Video Disk Recorder Revision History
SI data on the Czech/Slovak channels, which actually do follow the standard). 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 Users who want to set the default character set to something different can do wo
through "export VDR_CHARSET_OVERRIDE=ISO-8859-9". through "export VDR_CHARSET_OVERRIDE=ISO-8859-9".
- Fixed a signed character used as index in cBase64Encoder::NextLine() (thanks
to Tobias Grimm).

View File

@ -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: 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" #include "tools.h"
@ -1102,7 +1102,7 @@ const char *cBase64Encoder::NextLine(void)
int r = 0; int r = 0;
while (i < length && r < maxResult - 3) { while (i < length && r < maxResult - 3) {
result[r++] = b64[(data[i] >> 2) & 0x3F]; result[r++] = b64[(data[i] >> 2) & 0x3F];
char c = (data[i] << 4) & 0x3F; uchar c = (data[i] << 4) & 0x3F;
if (++i < length) if (++i < length)
c |= (data[i] >> 4) & 0x0F; c |= (data[i] >> 4) & 0x0F;
result[r++] = b64[c]; result[r++] = b64[c];