diff options
| author | Kyle Evans <kevans@FreeBSD.org> | 2020-04-17 02:09:31 +0000 |
|---|---|---|
| committer | Kyle Evans <kevans@FreeBSD.org> | 2020-04-17 02:09:31 +0000 |
| commit | cc62118e659ea041859441010a9669e8c98fb0c1 (patch) | |
| tree | 453885f796dfedab400bd17880d643295c65b2f2 /sys/security | |
| parent | 4d0b267a1f3d8c4775526f8aaa0963bdc2d40814 (diff) | |
Notes
Diffstat (limited to 'sys/security')
| -rw-r--r-- | sys/security/audit/audit_bsm_klib.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/security/audit/audit_bsm_klib.c b/sys/security/audit/audit_bsm_klib.c index 64b7a344a603..c8d602fb692c 100644 --- a/sys/security/audit/audit_bsm_klib.c +++ b/sys/security/audit/audit_bsm_klib.c @@ -433,10 +433,15 @@ audit_canon_path_vp(struct thread *td, struct vnode *rdir, struct vnode *cdir, __func__, __FILE__, __LINE__); copy = path; - if (*path == '/') + if (*path == '/') { vp = rdir; - else + } else { + if (cdir == NULL) { + cpath[0] = '\0'; + return; + } vp = cdir; + } MPASS(vp != NULL); /* * NB: We require that the supplied array be at least MAXPATHLEN bytes |
