Avoid using sprintf without format and use snprintf boundaries