From owner-freebsd-bugs Mon Jun 24 19:50:54 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 7E67537B435 for ; Mon, 24 Jun 2002 19:50:05 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g5P2o5Q72035; Mon, 24 Jun 2002 19:50:05 -0700 (PDT) (envelope-from gnats) Date: Mon, 24 Jun 2002 19:50:05 -0700 (PDT) Message-Id: <200206250250.g5P2o5Q72035@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Garrett Wollman Subject: bin/39815: rpc.statd bug Reply-To: Garrett Wollman Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/39815; it has been noted by GNATS. From: Garrett Wollman To: "C.S.Peron" Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: bin/39815: rpc.statd bug Date: Mon, 24 Jun 2002 22:40:29 -0400 (EDT) < said: > + if ((err = sm_check_hostname(arg->mon_name)) == 0) > + { > + syslog(LOG_ERR, "sm_stat: hostname contained invalid characters."); We have a library routine, strvis(3), which would be a more appropriate solution. { char *p = malloc(4 * strlen(arg->mon_name) + 1); if (p == 0) do_whatever_I_need_to_do_to_abort(); strvis(p, arg->mon_name, VIS_WHITE); syslog(LOG_ERR, "invalid hostname to sm_stat: %s", p); res.res_stat = stat_fail; free(p); } -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message