From owner-freebsd-bugs@FreeBSD.ORG Sun Sep 19 22:30:13 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42010106564A for ; Sun, 19 Sep 2010 22:30:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 1668F8FC0C for ; Sun, 19 Sep 2010 22:30:13 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o8JMUCCE093719 for ; Sun, 19 Sep 2010 22:30:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o8JMUCr7093716; Sun, 19 Sep 2010 22:30:12 GMT (envelope-from gnats) Date: Sun, 19 Sep 2010 22:30:12 GMT Message-Id: <201009192230.o8JMUCr7093716@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Jilles Tjoelker Cc: Subject: Re: bin/150384: [patch] tr(1): tr mis-parses '[=]=]' equivalence class X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Jilles Tjoelker List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Sep 2010 22:30:13 -0000 The following reply was made to PR bin/150384; it has been noted by GNATS. From: Jilles Tjoelker To: bug-followup@FreeBSD.org, richlowe@richlowe.net Cc: Subject: Re: bin/150384: [patch] tr(1): tr mis-parses '[=]=]' equivalence class Date: Mon, 20 Sep 2010 00:26:57 +0200 This indeed seems a bug. The patch, however, introduces another bug: when parsing the string "[=" it searches for ']' beyond the end of the string. An additional condition on s->str[2] is necessary to avoid this. -- Jilles Tjoelker