Prechádzať zdrojové kódy

* fixed buffer overrun in SysPCharToNtStr

git-svn-id: branches/cpstrrtl@25135 -
Jonas Maebe 12 rokov pred
rodič
commit
a00828e3e2
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  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;