Przemysław Czerpak wrote:

The maximum size of single memo block in FPT format is 4GB.
Any upper limit check we can introduce without reducing functionality
is comparing the size of memo block with the difference between total
memo file size and block offset. For relatively small memo files it
may help to early detect corruption but it will not help for big files
and for sure in all cases it will cause performance reduction because
we will have to add additional IO call to check current file size.
To reduce the overhead we can add such verification only for blocks
bigger then some arbitrary chosen by us limit i.e. 4MB.

If you think it's worth to implement then I can do that.

Perhaps the check could be optional? Although anything would introduce *some* level of performance hit.

Instead of a size check, perhaps a check digit on the size, or a hash would produce more reliable results - also optional?

Regards
Alex
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to