mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
Fixed a bug in AppendUnicodeStringToString which could cause a null to
be placed one position after the end of a completely full string. svn path=/trunk/; revision=8191
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $Id: unicode.c,v 1.36 2004/02/03 14:37:35 ekohl Exp $
|
||||
/* $Id: unicode.c,v 1.37 2004/02/15 07:04:45 arty Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
@@ -203,7 +203,8 @@ RtlAppendUnicodeStringToString(
|
||||
|
||||
memcpy((PVOID)Destination->Buffer + Destination->Length, Source->Buffer, Source->Length);
|
||||
Destination->Length += Source->Length;
|
||||
Destination->Buffer[Destination->Length / sizeof(WCHAR)] = 0;
|
||||
if( Destination->MaximumLength > Destination->Length )
|
||||
Destination->Buffer[Destination->Length / sizeof(WCHAR)] = 0;
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user