change (v)sprintf calls to (v)snprintf calls