core: replace constant by sizeof in a call to snprintf