Browse code

Fixed potential NULL pointer issue

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>

David Sommerseth authored on 2010/04/18 04:03:06
Showing 1 changed files
... ...
@@ -3265,7 +3265,7 @@ verify_user_pass_script (struct tls_session *session, const struct user_pass *up
3265 3265
     }
3266 3266
 
3267 3267
  done:
3268
-  if (strlen (tmp_file) > 0)
3268
+  if (tmp_file && strlen (tmp_file) > 0)
3269 3269
     delete_file (tmp_file);
3270 3270
 
3271 3271
   argv_reset (&argv);