From owner-freebsd-bugs@FreeBSD.ORG Sat Apr 24 23:30:26 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 45A2A16A4CE for ; Sat, 24 Apr 2004 23:30:26 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3D24A43D60 for ; Sat, 24 Apr 2004 23:30:26 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i3P6UQbv054951 for ; Sat, 24 Apr 2004 23:30:26 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i3P6UQWV054946; Sat, 24 Apr 2004 23:30:26 -0700 (PDT) (envelope-from gnats) Date: Sat, 24 Apr 2004 23:30:26 -0700 (PDT) Message-Id: <200404250630.i3P6UQWV054946@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: David Schultz Subject: Re: misc/62694: [PATCH] /usr/src/lib/libc/locale/ldpart.c buffer overflow X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: David Schultz List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Apr 2004 06:30:26 -0000 The following reply was made to PR misc/62694; it has been noted by GNATS. From: David Schultz To: moulin p Cc: phantom@FreeBSD.ORG, ache@FreeBSD.ORG, freebsd-gnats-submit@FreeBSD.ORG Subject: Re: misc/62694: [PATCH] /usr/src/lib/libc/locale/ldpart.c buffer overflow Date: Sat, 24 Apr 2004 23:21:45 -0700 On Wed, Feb 11, 2004, moulin p wrote: > in /usr/src/lib/libc/locale/ldpart.c > - *locale_buf was tested without prior checked if locale_buf > was NULL or not => sigvec under certain circumstances. If you look at the callers of this (private) function, you'll notice that this can't happen. Although locale_buf can be a pointer to NULL, it is never NULL itself. > - a strchr was used on an non '\0' terminated buffer => crash This appears to be a legitimate concern. Moreover, it appears that split_lines() may write a '\0' one byte beyond the end of the buffer. I've CC'd the original author and ache@, and hopefully one of them will take care of the problems. > in /usr/src/lib/libc/locale/srune.c (with gcc's -Werror flag) > - memcpy needs to be properly prototyped. > > in /usr/src/lib/libc/locale/wcstold.c (with gcc's -Werror flag) > - two unused variables. It looks like these were already fixed.