View Issue Details

IDProjectCategoryView StatusLast Update
0035936FPCPackagespublic2019-09-07 18:24
ReporterDenis KozlovAssigned ToMarco van de Voort 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product VersionProduct Build 
Target VersionFixed in Version 
Summary0035936: TCSVBuilder.DefaultOutputAsString always raises EReadError
DescriptionTCSVBuilder.DefaultOutputAsString always raises EReadError because the GetDefaultOutputAsString method reads past the stream end.

Basically, someone has forgot to reset the stream position to 0 before reading the entire stream.
Additional InformationSee here for the reference:

function TCSVBuilder.GetDefaultOutputAsString: String;
var
  StreamSize: Integer;
begin
  Result := '';
  StreamSize := FDefaultOutput.Size;
  if StreamSize > 0 then
  begin
    SetLength(Result, StreamSize);
    FDefaultOutput.ReadBuffer(Result[1], StreamSize);
  end;
end;
TagsNo tags attached.
Fixed in Revision42936
FPCOldBugId
FPCTarget-
Attached Files

Activities

Marco van de Voort

2019-09-07 18:24

manager   ~0117975

added position=0 in r42936, thanks

Issue History

Date Modified Username Field Change
2019-08-07 12:40 Denis Kozlov New Issue
2019-09-07 18:24 Marco van de Voort Assigned To => Marco van de Voort
2019-09-07 18:24 Marco van de Voort Status new => resolved
2019-09-07 18:24 Marco van de Voort Resolution open => fixed
2019-09-07 18:24 Marco van de Voort Fixed in Revision => 42936
2019-09-07 18:24 Marco van de Voort FPCTarget => -
2019-09-07 18:24 Marco van de Voort Note Added: 0117975