Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Dec 2009 04:49:29 +0000 (UTC)
From:      Jamie Gritton <jamie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r200750 - stable/8/lib/libjail
Message-ID:  <200912200449.nBK4nTOE053201@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jamie
Date: Sun Dec 20 04:49:29 2009
New Revision: 200750
URL: http://svn.freebsd.org/changeset/base/200750

Log:
  MFC r200623:
  
    Add a null pointer check so "name" can be used as a key parameter in
    jailparam_get.
  
  PR:		bin/141692
  Submitted by:	delphij

Modified:
  stable/8/lib/libjail/jail.c
Directory Properties:
  stable/8/lib/libjail/   (props changed)

Modified: stable/8/lib/libjail/jail.c
==============================================================================
--- stable/8/lib/libjail/jail.c	Sun Dec 20 04:45:32 2009	(r200749)
+++ stable/8/lib/libjail/jail.c	Sun Dec 20 04:49:29 2009	(r200750)
@@ -532,7 +532,7 @@ jailparam_get(struct jailparam *jp, unsi
 	}
 	jp_key = jp_lastjid ? jp_lastjid :
 	    jp_jid && jp_jid->jp_valuelen == sizeof(int) &&
-	    *(int *)jp_jid->jp_value ? jp_jid : jp_name;
+	    jp_jid->jp_value && *(int *)jp_jid->jp_value ? jp_jid : jp_name;
 	if (jp_key == NULL || jp_key->jp_value == NULL) {
 		strlcpy(jail_errmsg, "no jail specified", JAIL_ERRMSGLEN);
 		errno = ENOENT;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912200449.nBK4nTOE053201>