From owner-freebsd-bugs Tue Feb 4 14:30:08 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id OAA18496 for bugs-outgoing; Tue, 4 Feb 1997 14:30:08 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id OAA18471; Tue, 4 Feb 1997 14:30:03 -0800 (PST) Date: Tue, 4 Feb 1997 14:30:03 -0800 (PST) Message-Id: <199702042230.OAA18471@freefall.freebsd.org> To: freebsd-bugs Cc: From: j@uriah.heep.sax.de (J Wunsch) Subject: Re: misc/2654: Patches for locale buffer overruns for 2.1 and 2.2. Reply-To: j@uriah.heep.sax.de (J Wunsch) Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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. ;-)