Fix unsafe usage of snprintf()

Found by Debian's hardened GCC flags