diff options
| author | Linus Nordberg <linus@nordberg.se> | 2010-11-15 14:47:19 +0100 | 
|---|---|---|
| committer | Linus Nordberg <linus@nordberg.se> | 2010-11-15 14:47:19 +0100 | 
| commit | 7deb5182d520ffeff4a8f61b99edac5c0e6a74c6 (patch) | |
| tree | a381018cac585da810d9950cfea7476c380b8d6b | |
| parent | 2eb56ca9aea02ae987f92a289c1ea6cd0173cc52 (diff) | |
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end."
| -rw-r--r-- | radsecproxy.c | 10 | 
1 files changed, 6 insertions, 4 deletions
| diff --git a/radsecproxy.c b/radsecproxy.c index 2276d40..f026fee 100644 --- a/radsecproxy.c +++ b/radsecproxy.c @@ -2417,10 +2417,12 @@ struct modattr *extractmodattr(char *nameval) {  struct rewrite *getrewrite(char *alt1, char *alt2) {      struct rewrite *r; -    if ((r = hash_read(rewriteconfs,  alt1, strlen(alt1)))) -	return r; -    if ((r = hash_read(rewriteconfs,  alt2, strlen(alt2)))) -	return r; +    if (alt1) +	if ((r = hash_read(rewriteconfs,  alt1, strlen(alt1)))) +	    return r; +    if (alt2) +	if ((r = hash_read(rewriteconfs,  alt2, strlen(alt2)))) +	    return r;      return NULL;  } | 
