Преглед изворни кода

* manually fix buffer overflow in SysPCharToNtStr as fixed in cpstrrtl
merge in trunk (r25432)

git-svn-id: branches/fixes_2_6@25919 -

marco пре 12 година
родитељ
комит
b9c6714f0f
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      rtl/nativent/sysos.inc

+ 1 - 1
rtl/nativent/sysos.inc

@@ -368,7 +368,7 @@ begin
   aNtStr.Length := aLen * SizeOf(WideChar);
   aNtStr.MaximumLength := 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];
 end;