Date: Tue, 29 Aug 2000 14:01:56 +0300 (EEST) From: netch@carrier.kiev.ua (Valentin Nechayev) To: Kris Kennaway <kris@hub.freebsd.org>, freebsd-audit@freebsd.org Subject: Re: ether_line() patch Message-ID: <200008291101.OAT56202@burka.carrier.kiev.ua>
next in thread | raw e-mail | index | archive | help
KK> @@ -156,8 +178,8 @@ KK> strlen(ether_a), &result, &resultlen)) { KK> continue; KK> } KK> - strncpy(buf, result, resultlen); KK> - buf[resultlen] = '\0'; KK> + strncpy(buf, result, sizeof(buf) - 1); KK> + buf[sizeof(buf)] = '\0'; KK> free(result); Will it be better to write `strlcpy(buf, result, sizeof(buf))' ? /netch To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200008291101.OAT56202>