Date: Sun, 08 Oct 2000 09:54:08 -0400 From: "Brian F. Feldman" <green@FreeBSD.org> To: Kris Kennaway <kris@citusc.usc.edu> Cc: audit@FreeBSD.org Subject: Re: isdnd cleanup Message-ID: <200010081354.e98Ds8511931@green.dyndns.org> In-Reply-To: Message from Kris Kennaway <kris@citusc.usc.edu> of "Sun, 08 Oct 2000 00:05:59 PDT." <20001008000559.A18475@citusc17.usc.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
Kris Kennaway <kris@citusc.usc.edu> wrote: > There were a couple of string functions I left alone, but they all > seem safe. > > Kris COLS and LINES are not really constants (stupid stupid curses), so this will break if really big terminals are used. Do you think that is worth fixing? Just change the lines to while (strlen(buffer) < COLS && strlen(buffer) < sizeof(buffer) - 1) strcat(buffer, "-"); Course, it's a stupid O(n^2) loop anyway, but it's not like you can just do buffer.concat '-' * [COLS - buffer.size, 0].max in C ;) -- Brian Fundakowski Feldman \ FreeBSD: The Power to Serve! / green@FreeBSD.org `------------------------------' 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?200010081354.e98Ds8511931>