Date: Tue, 12 Dec 2000 15:28:27 -0700 From: Warner Losh <imp@village.org> To: Dag-Erling Smorgrav <des@ofug.org> Cc: assar@FreeBSD.ORG, Matt Dillon <dillon@earth.backplane.com>, kris@citusc.usc.edu, arch@FreeBSD.ORG Subject: Re: Safe string formatting in the kernel Message-ID: <200012122228.PAA33203@harmony.village.org> In-Reply-To: Your message of "12 Dec 2000 21:31:28 %2B0100." <xzplmtlfkkf.fsf@flood.ping.uio.no> References: <xzplmtlfkkf.fsf@flood.ping.uio.no> <xzpelzd66qy.fsf@flood.ping.uio.no> <xzpsnnuq1hy.fsf@flood.ping.uio.no> <20001211185610.A1741@citusc.usc.edu> <200012120259.eBC2xfb99004@earth.backplane.com> <5lhf4ap8cv.fsf@assaris.sics.se> <200012121825.LAA31285@harmony.village.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <xzplmtlfkkf.fsf@flood.ping.uio.no> Dag-Erling Smorgrav writes: : Warner Losh <imp@village.org> writes: : > Just be careful that your dynamic string growing things don't violate : > the hard limit invariants in the kernel. If it produces paths longer : > than 1023 characters, for example, it is wrong. : : Code manipulating path names would specify a hard upper limit of : MAXPATHLEN. If there's a known, realtively small, upper limit, why does allocating it dynamically buy you when you could have a static buffer? I know that it costs you a trip into the kernel malloc routines which can be quite high at times. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200012122228.PAA33203>