fprintf or sprintf using a variable as the format argument enables format string attacks.
Pass an explicit constant format string instead of a variable.