From owner-svn-src-head@FreeBSD.ORG Tue May 12 16:59:53 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 496ED1065672; Tue, 12 May 2009 16:59:53 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 38A8F8FC14; Tue, 12 May 2009 16:59:53 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n4CGxrKH027968; Tue, 12 May 2009 16:59:53 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4CGxrMM027967; Tue, 12 May 2009 16:59:53 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200905121659.n4CGxrMM027967@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 12 May 2009 16:59:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r192021 - head/sys/geom/concat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2009 16:59:53 -0000 Author: trasz Date: Tue May 12 16:59:50 2009 New Revision: 192021 URL: http://svn.freebsd.org/changeset/base/192021 Log: Check return value of gctl_get_asciiparam(). Found with: Coverity Prevent(tm) CID: 1118 Modified: head/sys/geom/concat/g_concat.c Modified: head/sys/geom/concat/g_concat.c ============================================================================== --- head/sys/geom/concat/g_concat.c Tue May 12 16:39:43 2009 (r192020) +++ head/sys/geom/concat/g_concat.c Tue May 12 16:59:50 2009 (r192021) @@ -753,6 +753,10 @@ g_concat_ctl_create(struct gctl_req *req for (attached = 0, no = 1; no < *nargs; no++) { snprintf(param, sizeof(param), "arg%u", no); name = gctl_get_asciiparam(req, param); + if (name == NULL) { + gctl_error(req, "No 'arg%d' argument.", no); + return; + } if (strncmp(name, "/dev/", strlen("/dev/")) == 0) name += strlen("/dev/"); pp = g_provider_by_name(name);