On my distro (Fedora) attempting to perform any operations with actual files causes gtkpod to crash. This is due to the distro compiling packages with -D_FORTIFY_SOURCE=3
, which is a GCC/glibc flag that adds extra bounds checking. The offending line triggers on the last loop of any SHA calculation, when snprintf attempts to write the last 3 characters (two hex and a null terminator) to an array with 3 bytes remaining, but using an argument of 4 to snprintf, which is sufficient to trigger termination even though 4 bytes are never actually written.
Background information on _FORTIFY_SOURCE=3
: https://developers.redhat.com/articles/2022/09/17/gccs-new-fortification-level
Fedora gtkpod bug (with backtrace): https://bugzilla.redhat.com/show_bug.cgi?id=2256643
I will submit the same patch to Fedora for inclusion there until included in a new gtkpod release (since without the patch gtkpod is effectively unusable).