Data corruption on file copying/moving fixed

Andrew V. Samoilov sav at bcs.zp.ua
Wed Mar 26 10:30:29 UTC 2003


Hello!

There was a data corruption possibility in the file.c:copy_file_file()
for a years.  If mc_write() fails to write n_read bytes at once for some 
reason then n_read is fixed, but buf is not, so there are some pieces 
from beginning of buf instead of trailing part.

Possible scenario: copy/move file to some partition without enough 
space, remove some files to provide enough space and press "Retry".

Path commited.

-- 
Regards,
Andrew V. Samoilov
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: file.c.patch
URL: <http://lists.midnight-commander.org/pipermail/mc-devel/attachments/20030326/ba7e7a0f/attachment.ksh>


More information about the mc-devel mailing list