mirror of
				https://github.com/vdr-projects/vdr.git
				synced 2025-03-01 10:50:46 +00:00 
			
		
		
		
	Fixed handling reallocated memory in cCharSetConv::Convert()
This commit is contained in:
		@@ -1529,6 +1529,7 @@ Udo Richter <udo_richter@gmx.de>
 | 
			
		||||
 for fixing handling single byte characters >0x7F in Utf8ToArray()
 | 
			
		||||
 for fixing clearing color buttons in the 'curses' skin
 | 
			
		||||
 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>
 | 
			
		||||
 for his help in keeping 'channels.conf.terr' up to date
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								HISTORY
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								HISTORY
									
									
									
									
									
								
							@@ -5460,3 +5460,5 @@ Video Disk Recorder Revision History
 | 
			
		||||
- Only creating a new cDvbOsdProvider in cDvbDevice::MakePrimaryDevice() if 'On'
 | 
			
		||||
  is true (i.e. this device is being made the primary device).
 | 
			
		||||
- Updated the Italian OSD texts (thanks to Diego Pierotto).
 | 
			
		||||
- Fixed handling reallocated memory in cCharSetConv::Convert() (reported by Udo
 | 
			
		||||
  Richter).
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								tools.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								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.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"
 | 
			
		||||
@@ -791,7 +791,7 @@ const char *cCharSetConv::Convert(const char *From, char *To, size_t ToLength)
 | 
			
		||||
                 size_t d = ToPtr - result;
 | 
			
		||||
                 size_t r = length / 2;
 | 
			
		||||
                 length += r;
 | 
			
		||||
                 result = (char *)realloc(result, length);
 | 
			
		||||
                 Converted = result = (char *)realloc(result, length);
 | 
			
		||||
                 ToLength += r;
 | 
			
		||||
                 ToPtr = result + d;
 | 
			
		||||
                 }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user