From owner-cvs-src@FreeBSD.ORG Mon May 19 18:38:02 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00EDC106566B; Mon, 19 May 2008 18:38:02 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C6CAF8FC0A; Mon, 19 May 2008 18:38:01 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m4JIc17U097889; Mon, 19 May 2008 18:38:01 GMT (envelope-from cperciva@repoman.freebsd.org) Received: (from cperciva@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m4JIc1uE097888; Mon, 19 May 2008 18:38:01 GMT (envelope-from cperciva) Message-Id: <200805191838.m4JIc1uE097888@repoman.freebsd.org> From: Colin Percival Date: Mon, 19 May 2008 18:38:01 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/usr.bin/tar bsdtar.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2008 18:38:02 -0000 cperciva 2008-05-19 18:38:01 UTC FreeBSD src repository Modified files: usr.bin/tar bsdtar.c Log: Detect if argv[1] is "" and avoid calling malloc(0). Prior to this commit, running 'tar ""' would print 'No memory' instead of the correct error message, 'Must specify one of -c, -r, -t, -u, -x' if malloc is set to System V mode (malloc(0) == NULL). Revision Changes Path 1.90 +2 -2 src/usr.bin/tar/bsdtar.c