[PATCH] filename corruptions / wrong usage of strcpy
Brought to you by:
mhe,
splicednetworks
Hi,
Since a few months I've noticed that yafc uploads files with a wrong
name. For example a file named 'IMG_0301.JPG' will be renamed as
'IMG_0001.JPG'.
This is due to a wrong usage of the strcpy function. strcpy cannot be
used with source and destination overlapping. With optimized
implementations this might led to inconsistencies.
Please find a patched attached.
Regards,
--
Lionel Landwerlin
strpull fix
I have the same issue with yafc (on Gentoo amd64); your patch fixes the filename corruption for me, however the messages printed by yafc still show corrupted filenames. So without your patch, actually corrupt files make it on the FTP server; with your patch, the files are uploaded correctly, but yafc still prints corrupted filenames.
I'm not able to reproduce your problem. Are you sure you're not experiencing some caching issue ?
Some caching issue indeed - it was somehow caused by ccache, after recompiling yafc without ccache it works fine. Recompiling it again with ccache, and the problem resurfaces. So... bad ccache, great patch, thanks.