Date: Tue, 4 Feb 1997 14:30:03 -0800 (PST) From: j@uriah.heep.sax.de (J Wunsch) To: freebsd-bugs Subject: Re: misc/2654: Patches for locale buffer overruns for 2.1 and 2.2. Message-ID: <199702042230.OAA18471@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR misc/2654; it has been noted by GNATS.
From: j@uriah.heep.sax.de (J Wunsch)
To: tenser@spitfire.ecsel.psu.edu
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: misc/2654: Patches for locale buffer overruns for 2.1 and 2.2.
Date: Tue, 4 Feb 1997 21:16:47 +0100
As tenser@spitfire.ecsel.psu.edu wrote:
> ! strcpy(buf, path_locale);
> ! strcat(buf, "/");
> ! strcat(buf, encoding);
> ! strcat(buf, "/LC_COLLATE");
> if ((fp = fopen(buf, "r")) == NULL)
> return -1;
> FREAD(__collate_charmap_table, sizeof(__collate_charmap_table), 1, fp);
> --- 66,73 ----
> return -1;
> if (!path_locale && !(path_locale = getenv("PATH_LOCALE")))
> path_locale = _PATH_LOCALE;
> ! (void)snprintf(buf,
> ! PATH_MAX, "%s/%s/LC_COLLATE", path_locale, encoding);
Incidentally, i also tried to apply your fix quite some time ago --
and i stood corrected, the problem has already been fixed without
using snprintf().
--
cheers, J"org
joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199702042230.OAA18471>
