first round of s/sprintf/snprintf/; the rationale is: truncate error messages...
first round of s/sprintf/snprintf/; the rationale is: truncate error messages rather than buffer overflow; otherwise, assert that no buffer overflow occurred. In some cases, error handling could be added.