changeset 532:4cb8f63a0f67

Fix segfault when no configuration string is given to the plugins
author Sebastien Decugis <sdecugis@nict.go.jp>
date Mon, 06 Sep 2010 14:46:25 +0900
parents d1cb0dadc22d
children 4cdf146f11d5
files extensions/app_radgw/rgwx_acct.c extensions/app_radgw/rgwx_auth.c
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/extensions/app_radgw/rgwx_acct.c	Mon Sep 06 14:40:16 2010 +0900
+++ b/extensions/app_radgw/rgwx_acct.c	Mon Sep 06 14:46:25 2010 +0900
@@ -175,7 +175,7 @@
 	CHECK_FCT( fd_sess_handler_create( &new->sess_hdl, free ) );
 	new->confstr = conffile;
 	
-	if (strstr(conffile, "nonai"))
+	if (conffile && strstr(conffile, "nonai"))
 		new->ignore_nai = 1;
 	
 	/* Resolve all dictionary objects we use */
--- a/extensions/app_radgw/rgwx_auth.c	Mon Sep 06 14:40:16 2010 +0900
+++ b/extensions/app_radgw/rgwx_auth.c	Mon Sep 06 14:46:25 2010 +0900
@@ -141,7 +141,7 @@
 	CHECK_FCT( fd_sess_handler_create( &new->sess_hdl, free ) );
 	new->confstr = confstr;
 	
-	if (strstr(confstr, "nonai"))
+	if (confstr && strstr(confstr, "nonai"))
 		new->ignore_nai = 1;
 	
 	/* Resolve all dictionary objects we use */
"Welcome to our mercurial repository"