projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
386cb63
)
Complain on references to things like "prefix ="
author
Alan T. DeKok
<aland@freeradius.org>
Mon, 25 Aug 2008 21:28:49 +0000
(23:28 +0200)
committer
Alan T. DeKok
<aland@freeradius.org>
Mon, 25 Aug 2008 21:28:49 +0000
(23:28 +0200)
i.e. check for cp->value == NULL, rather than core dumping
src/main/conffile.c
patch
|
blob
|
history
diff --git
a/src/main/conffile.c
b/src/main/conffile.c
index
c95567f
..
289bd2c
100644
(file)
--- a/
src/main/conffile.c
+++ b/
src/main/conffile.c
@@
-730,6
+730,11
@@
static const char *cf_expand_variables(const char *cf, int *lineno,
* Substitute the value of the variable.
*/
cp = cf_itemtopair(ci);
+ if (!cp->value) {
+ radlog(L_ERR, "%s[%d]: Reference \"%s\" has no value",
+ cf, *lineno, input);
+ return NULL;
+ }
strcpy(p, cp->value);
p += strlen(p);
ptr = end + 1;