In "fpc\rtl\inc\file.inc" (and fpc\fpc\rtl\inc\text.inc) the declaration of "Assign"
uses the generic "String" type for the file name. I think this can be
AnsiString too, so it may be longer than 255 characters.
But the assignment to the internal *rec element "name" (which
is "array[0..255] of char") is done with

Move(s[1],TextRec(t).Name,Length(s));

That would be a bug IMO when S is longer than 255 characters.
"Move" does no range check.

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to