add: buf[sizeof(buf)-1] = '\0';
context: Ns_ConnPrintfHeader(Ns_Conn *conn, char *fmt,...){    int result;    if (conn->request != NULL && conn->request->version >= 1.0) {        char    buf[4096];        va_list ap;        va_start(ap, fmt);#ifdef NO_VSNPRINTF        vsprintf(buf, fmt, ap);#else        vsnprintf(buf, sizeof(buf)-1, fmt, ap);#endif        va_end(ap);        result = Ns_ConnPuts(conn, buf);    } else {        result = NS_OK;    }        return result;}