diff options
| -rw-r--r-- | src/pam_radius_auth.c | 6 | 
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pam_radius_auth.c b/src/pam_radius_auth.c index 887ee1e..853b8a1 100644 --- a/src/pam_radius_auth.c +++ b/src/pam_radius_auth.c @@ -107,6 +107,12 @@ static int _pam_parse(int argc, CONST char **argv, radius_conf_t *conf)  		/* generic options */  		if (!strncmp(*argv,"conf=",5)) { +			/* protect against buffer overflow */ +			if (strlen(*argv+5) >= sizeof(conf_file)) { +				_pam_log(LOG_ERR, "conf= argument too long"); +				conf_file[0] = 0; +				return 0; +			}  			strcpy(conf_file,*argv+5);  		} else if (!strcmp(*argv, "use_first_pass")) {  | 
