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

Fixed handling reallocated memory in cCharSetConv::Convert()

This commit is contained in:
Klaus Schmidinger 2007-10-13 12:03:39 +02:00
parent 441b002be9
commit 929d3e9ba2
3 changed files with 5 additions and 2 deletions

View File

@ -1529,6 +1529,7 @@ Udo Richter <udo_richter@gmx.de>
for fixing handling single byte characters >0x7F in Utf8ToArray() for fixing handling single byte characters >0x7F in Utf8ToArray()
for fixing clearing color buttons in the 'curses' skin for fixing clearing color buttons in the 'curses' skin
for adding a missing error report to cCuttingThread::Action() for adding a missing error report to cCuttingThread::Action()
for reporting a problem in handling reallocated memory in cCharSetConv::Convert()
Sven Kreiensen <svenk@kammer.uni-hannover.de> Sven Kreiensen <svenk@kammer.uni-hannover.de>
for his help in keeping 'channels.conf.terr' up to date for his help in keeping 'channels.conf.terr' up to date

View File

@ -5460,3 +5460,5 @@ Video Disk Recorder Revision History
- Only creating a new cDvbOsdProvider in cDvbDevice::MakePrimaryDevice() if 'On' - Only creating a new cDvbOsdProvider in cDvbDevice::MakePrimaryDevice() if 'On'
is true (i.e. this device is being made the primary device). is true (i.e. this device is being made the primary device).
- Updated the Italian OSD texts (thanks to Diego Pierotto). - Updated the Italian OSD texts (thanks to Diego Pierotto).
- Fixed handling reallocated memory in cCharSetConv::Convert() (reported by Udo
Richter).

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.135 2007/08/05 12:18:15 kls Exp $ * $Id: tools.c 1.136 2007/10/13 12:00:21 kls Exp $
*/ */
#include "tools.h" #include "tools.h"
@ -791,7 +791,7 @@ const char *cCharSetConv::Convert(const char *From, char *To, size_t ToLength)
size_t d = ToPtr - result; size_t d = ToPtr - result;
size_t r = length / 2; size_t r = length / 2;
length += r; length += r;
result = (char *)realloc(result, length); Converted = result = (char *)realloc(result, length);
ToLength += r; ToLength += r;
ToPtr = result + d; ToPtr = result + d;
} }