mirror of
https://github.com/reactos/reactos.git
synced 2025-05-30 22:49:12 +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:
parent
b900afead3
commit
757ff359b5
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue