From owner-freebsd-current Fri Nov 20 22:15:10 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA14169 for freebsd-current-outgoing; Fri, 20 Nov 1998 22:15:10 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.15.68.22]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA14164 for ; Fri, 20 Nov 1998 22:15:07 -0800 (PST) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id RAA24812; Sat, 21 Nov 1998 17:14:20 +1100 Date: Sat, 21 Nov 1998 17:14:20 +1100 From: Bruce Evans Message-Id: <199811210614.RAA24812@godzilla.zeta.org.au> To: archie@whistle.com, grog@lemis.com, rnordier@nordier.com Subject: Re: snprintf() in the kernel Cc: freebsd-current@FreeBSD.ORG Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >As promised, here are the patches to add [v]snprintf() to the kernel >and fix a zillion occurrences of sprintf() and str[n]cpy()... > > ftp://ftp.whistle.com/pub/archie/misc/SNPRINTF.patch.gz It would have been easier to review if it were here: >[here] >There are 124 files affected.. so reviews are much appreciated! snprintf returns a value which is almost always ignored. Most of the strncpy -> snprintf changes are dubious, since strncpy is often used for character arrays that aren't strings. The changes for disk labels are certainly wrong. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message