Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Jul 2001 12:08:37 -0400 (EDT)
From:      Mike Barcroft <mike@q9media.com>
To:        "Andrey A. Chernov" <ache@nagual.pp.ru>
Cc:        jkh@freebsd.org, audit@freebsd.org
Subject:   Re: CFR: add /etc/ttys console tuning to sysinstall
Message-ID:  <200107141608.f6EG8bh28861@coffee.q9media.com>

next in thread | raw e-mail | index | archive | help
In configTtys():
[...]
> +    char templ[20];
[...]
> +    strcpy(templ, _PATH_TTYS ".XXXXXX");
[...]

This makes the assumption that _PATH_TTYS is < 13.  Maybe you should
do something like:

#define _X_EXTENTION ".XXXXXX"
char templ[sizeof(_PATH_TTYS) + sizeof(_X_EXTENTION) - 1];
strcpy(templ, _PATH_TTYS _X_EXTENTION);

Or you could use strlcpy(3) to be paranoid.


Best regards,
Mike Barcroft

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?200107141608.f6EG8bh28861>