Browse Source

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

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

marco 12 năm trước cách đây
mục cha
commit
b9c6714f0f
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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;