More sprintf -> snprintf
use snprintf rather than sprintf