Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2005-05

patch for xmlreader

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Vincent Snijders

Hi,

Attached patch fixed an error in the xmlreader.

If a text attribute contained a ", but not at the end of the string it could fail.

For example this (minimal) xml file:
<?xml version="1.0"?>
<CONFIG Value="&quot;TEST&quot;." />

TestProgram:
program testxmlcfg;
{$mode objfpc}{$H+}
uses
    Classes, SysUtils, xmlcfg;
var
   AFilename: string;
begin
   AFileName:= 'test.xml';
   try
     XMLConfig:=TXMLConfig.Create(AFilename);
   finally
     XMLConfig.Free;
   end;
end.

It crashed if run with heaptrc and gave error if run with valgrind, but not with the patch applied.

Regards,
Vincent.

Reply by email