]> granicus.if.org Git - sudo/commitdiff
Add a NULL check in audit_success() and audit_failure() just to be
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 13 Aug 2011 16:35:11 +0000 (12:35 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 13 Aug 2011 16:35:11 +0000 (12:35 -0400)
on the safe side.

--HG--
branch : 1.7

audit.c

diff --git a/audit.c b/audit.c
index 15ac8eea7e2b2b8d9159b6e780cc7377744a58e0..e750374e6d20ce77eafd5e2e20744a58a921257f 100644 (file)
--- a/audit.c
+++ b/audit.c
@@ -50,6 +50,9 @@ audit_success(exec_args)
     const char *exec_args[];
 #endif
 {
+    if (exec_args == NULL)
+       return;
+
 #ifdef HAVE_BSM_AUDIT
     bsm_audit_success(exec_args);
 #endif
@@ -70,6 +73,9 @@ audit_failure(exec_args, fmt, va_alist)
 {
     va_list ap;
 
+    if (exec_args == NULL)
+       return;
+
 #ifdef __STDC__
     va_start(ap, fmt);
 #else