By which I mean, you need to use snprintf everywhere. The safety is not optional.