mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 07:09:23 +02:00
* fixed buffer overrun in SysPCharToNtStr
git-svn-id: branches/cpstrrtl@25135 -
This commit is contained in:
parent
953e088c14
commit
a00828e3e2
@ -368,7 +368,7 @@ begin
|
|||||||
aNtStr.Length := aLen * SizeOf(WideChar);
|
aNtStr.Length := aLen * SizeOf(WideChar);
|
||||||
aNtStr.MaximumLength := aNtStr.Length;
|
aNtStr.MaximumLength := aNtStr.Length;
|
||||||
aNtStr.Buffer := GetMem(aNtStr.Length);
|
aNtStr.Buffer := GetMem(aNtStr.Length);
|
||||||
for i := 0 to aLen do
|
for i := 0 to aLen-1 do
|
||||||
aNtStr.Buffer[i] := aText[i];
|
aNtStr.Buffer[i] := aText[i];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user