mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-12 09:58:36 +00:00
Add a null pointer check so "name" can be used as a key parameter in
jailparam_get. PR: bin/141692 Submitted by: delphij MFC after: 3 days
This commit is contained in:
parent
e7d829a46c
commit
1574e5ddd9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=200623
@ -532,7 +532,7 @@ jailparam_get(struct jailparam *jp, unsigned njp, int flags)
|
||||
}
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user