From owner-freebsd-audit Tue Jul 3 21:22:45 2001 Delivered-To: freebsd-audit@freebsd.org Received: from iatl0x01.coxmail.com (iatl1x01.coxmail.com [206.157.231.23]) by hub.freebsd.org (Postfix) with ESMTP id 5B7AE37B401 for ; Tue, 3 Jul 2001 21:22:42 -0700 (PDT) (envelope-from mheffner@novacoxmail.com) Received: from enterprise.muriel.penguinpowered.com ([208.138.198.178]) by iatl0x01.coxmail.com (InterMail vK.4.03.02.00 201-232-124 license 85f4f10023be2bd3bce00b3a38363ea2) with ESMTP id <20010704042241.TSZT1034.iatl0x01@enterprise.muriel.penguinpowered.com>; Wed, 4 Jul 2001 00:22:41 -0400 Message-ID: X-Mailer: XFMail 1.5.0 on FreeBSD X-Priority: 3 (Normal) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="_=XFMail.1.5.0.FreeBSD:20010704002118:288=_"; micalg=pgp-md5; protocol="application/pgp-signature" In-Reply-To: <200107031544.f63FiaV07250@coffee.q9media.com> Date: Wed, 04 Jul 2001 00:21:18 -0400 (EDT) Reply-To: Mike Heffner From: Mike Heffner To: Mike Barcroft Subject: Re: src/bin/chio patch Cc: audit@FreeBSD.org Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG This message is in MIME format --_=XFMail.1.5.0.FreeBSD:20010704002118:288=_ Content-Type: text/plain; charset=us-ascii On 03-Jul-2001 Mike Barcroft wrote: | Mike Barcroft writes: |> Mike Barcroft writes: |> > - strncpy(csvr.csvr_voltag.cv_volid, argv[2], |> > + (void) memcpy(csvr.csvr_voltag.cv_volid, argv[2], |> > sizeof(csvr.csvr_voltag.cv_volid)); |> > + csvr.csvr_voltag.cv_volid[strlen(argv[2]) + 1] = '\0'; |> |> Hmm.. what was I thinking with this? It's probably better just |> to use a cast. Also the NUL char is off by one byte and assumes |> that strlen(argv[2]) < sizeof(csvr.csvr_voltag.cv_volid). |> |> I should go to sleep. I'll fix this in the morning. | | I've corrected this in the patch at the end of this message and | also at: http://testbed.q9media.com/freebsd/chio.20010704.patch Ok, looks good, Alpha now compiles cleanly. I'll probably committ these tomorrow. Mike -- Mike Heffner Fredericksburg, VA --_=XFMail.1.5.0.FreeBSD:20010704002118:288=_ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE7Qpm+FokZQs3sv5kRAhA6AJ43UBMvwIWDeIuHOPIXifbZYtyEZACeMmaK 4kMpkj2DXZZOh4/hR5IYS6s= =9XyB -----END PGP SIGNATURE----- --_=XFMail.1.5.0.FreeBSD:20010704002118:288=_-- End of MIME message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message