浏览代码

* TXMLConfig.ResetKey: Don't access memory beyond allocated array length, resolves #20098.

git-svn-id: trunk@18913 -
sergei 14 年之前
父节点
当前提交
3ad7552fc4
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      packages/fcl-xml/src/xmlconf.pp

+ 1 - 1
packages/fcl-xml/src/xmlconf.pp

@@ -431,7 +431,7 @@ procedure TXMLConfig.ResetKey;
 var
 var
   I: Integer;
   I: Integer;
 begin
 begin
-  for I := Length(FPathStack) downto 0 do
+  for I := Length(FPathStack)-1 downto 0 do
     FPathStack[I] := '';
     FPathStack[I] := '';
   FElement := nil;    
   FElement := nil;    
   FPathDirty := False;
   FPathDirty := False;