From owner-freebsd-current@FreeBSD.ORG Fri Mar 19 19:12:42 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2E65106564A for ; Fri, 19 Mar 2010 19:12:42 +0000 (UTC) (envelope-from wooh@wooh.hu) Received: from mail.netidea.hu (netwarehouse.netidea.hu [195.228.254.126]) by mx1.freebsd.org (Postfix) with ESMTP id AB5248FC14 for ; Fri, 19 Mar 2010 19:12:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netidea.hu (Postfix) with ESMTP id 6D074128D38 for ; Fri, 19 Mar 2010 19:41:55 +0100 (CET) X-Virus-Scanned: amavisd-new at netidea.hu Received: from mail.netidea.hu ([127.0.0.1]) by localhost (mail.netidea.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4vEzRGEbLnTq for ; Fri, 19 Mar 2010 19:41:53 +0100 (CET) Received: from jamms-MacBook.local (catv-80-98-233-66.catv.broadband.hu [80.98.233.66]) by mail.netidea.hu (Postfix) with ESMTP id 12FFB128D2C for ; Fri, 19 Mar 2010 19:41:53 +0100 (CET) Message-ID: <4BA3C5DE.50001@wooh.hu> Date: Fri, 19 Mar 2010 19:43:42 +0100 From: Adam PAPAI User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: freebsd-current@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: bsdtar(1) line_reader.c interesting code part - partial patch X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 19:12:43 -0000 Hi, Bug report sais: http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/144786 bsdtar(1) doesn't support multi line matching or it is broken. This patch [1] should solve it but not sure about this line in the original code: if (lr->nullSeparator) { ... } This is constant '\n' so this code part was never reached. This is why the '\n' separated lines were handled as one long line. The line_reader.c header comment sais: * Read lines from file and do something with each one. If option_null * is set, lines are terminated with zero bytes; otherwise, they're * terminated with newlines. But where is the switch to change between \n and zero bytes? :) [1]: http://www.wooh.hu/freebsd/line_reader.c.patch.txt -- Adam PAPAI