Convert sprintf() to snprintf().

Consider to use "pragma poison sprintf" in utilities.h.