From owner-svn-src-all@freebsd.org Tue Apr 25 18:30:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18F6FD50218; Tue, 25 Apr 2017 18:30:21 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EEBCBEA8; Tue, 25 Apr 2017 18:30:20 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v3PIUHwL062646; Tue, 25 Apr 2017 11:30:17 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v3PIUHdb062645; Tue, 25 Apr 2017 11:30:17 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201704251830.v3PIUHdb062645@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r317409 - head/contrib/tcpdump In-Reply-To: <201704251556.v3PFuk5U053547@repo.freebsd.org> To: Gleb Smirnoff Date: Tue, 25 Apr 2017 11:30:17 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Apr 2017 18:30:21 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: glebius > Date: Tue Apr 25 15:56:46 2017 > New Revision: 317409 > URL: https://svnweb.freebsd.org/changeset/base/317409 > > Log: > Cherry-pick 5d3c5151c2b885aab36627bafb8539238da27b2d, it fixes use after free Lets not use git hashes as references in commit messages, it has very little value for someone reading a log of changes looking for something. There is no promise that it can be found later (github can go Poof). > if tcpdump(1) is run on non-existent interface. > > Suggested by: zeising > > Modified: > head/contrib/tcpdump/tcpdump.c > > Modified: head/contrib/tcpdump/tcpdump.c > ============================================================================== > --- head/contrib/tcpdump/tcpdump.c Tue Apr 25 13:17:34 2017 (r317408) > +++ head/contrib/tcpdump/tcpdump.c Tue Apr 25 15:56:46 2017 (r317409) > @@ -1085,9 +1085,9 @@ open_interface(const char *device, netdi > /* > * Return an error for our caller to handle. > */ > - pcap_close(pc); > snprintf(ebuf, PCAP_ERRBUF_SIZE, "%s: %s\n(%s)", > device, pcap_statustostr(status), cp); > + pcap_close(pc); > return (NULL); > } else if (status == PCAP_ERROR_PERM_DENIED && *cp != '\0') > error("%s: %s\n(%s)", device, > > -- Rod Grimes rgrimes@freebsd.org