Browse Source

* xmlread.pp, fixed condition that was causing an infinite loop in case when a malformed xml contained a null character within whitespace (to be exact, within parts processed by SkipS procedure). Great thanks to alexs75 for finding and supplying such xml file :)

git-svn-id: trunk@16766 -
sergei 14 years ago
parent
commit
caa786af56
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/fcl-xml/src/xmlread.pp

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

@@ -1194,7 +1194,7 @@ begin
       Result := True;
     until False;
     FSource.FBuf := p;
-  until (p^ <> #0) or (not FSource.Reload);
+  until (FSource.FBuf < FSource.FBufEnd) or (not FSource.Reload);
   if (not Result) and Required then
     FatalError('Expected whitespace');
 end;