Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 04 Jul 2001 00:21:18 -0400 (EDT)
From:      Mike Heffner <mheffner@novacoxmail.com>
To:        Mike Barcroft <mike@q9media.com>
Cc:        audit@FreeBSD.org
Subject:   Re: src/bin/chio patch
Message-ID:  <XFMail.20010704002118.mheffner@novacoxmail.com>
In-Reply-To: <200107031544.f63FiaV07250@coffee.q9media.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <mike@q9media.com> writes:
|> Mike Barcroft <mike@q9media.com> 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         <mheffner@[acm.]vt.edu>
  Fredericksburg, VA       <mikeh@FreeBSD.org>


--_=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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20010704002118.mheffner>