Menu

#23 [PATCH] filename corruptions / wrong usage of strcpy

open
nobody
None
5
2010-12-27
2010-12-27
No

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

Discussion

  • Alzheimer

    Alzheimer - 2011-01-01

    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.

     
  • Dj-Death (Lionel Landwerlin)

    I'm not able to reproduce your problem. Are you sure you're not experiencing some caching issue ?

     
  • Alzheimer

    Alzheimer - 2011-01-02

    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.

     

Log in to post a comment.

Monday.com Logo