]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fixed potential NULL pointer issue
authorDavid Sommerseth <dazo@users.sourceforge.net>
Sat, 17 Apr 2010 19:03:06 +0000 (21:03 +0200)
committerDavid Sommerseth <dazo@users.sourceforge.net>
Thu, 29 Apr 2010 18:22:29 +0000 (20:22 +0200)
If create_temp_file() returns NULL, this strlen() check would cause
a SEGV.

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
ssl.c

diff --git a/ssl.c b/ssl.c
index 30477197fdec2852b4ef34e16eda15039254ab4f..44a1bb219c745c91ef800bd0eef4ddaccfebf703 100644 (file)
--- a/ssl.c
+++ b/ssl.c
@@ -3194,7 +3194,7 @@ verify_user_pass_script (struct tls_session *session, const struct user_pass *up
     }
 
  done:
-  if (strlen (tmp_file) > 0)
+  if (tmp_file && strlen (tmp_file) > 0)
     delete_file (tmp_file);
 
   argv_reset (&argv);