ソースを参照

* 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;