projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
240d55c
)
bugfix a SIGSEGV during 'show debug condition' in radmin
author
Jorge Pereira
<jpereiran@gmail.com>
Fri, 29 May 2015 18:54:51 +0000
(15:54 -0300)
committer
Arran Cudbard-Bell
<a.cudbardb@freeradius.org>
Fri, 29 May 2015 19:04:26 +0000
(15:04 -0400)
src/main/parser.c
patch
|
blob
|
history
diff --git
a/src/main/parser.c
b/src/main/parser.c
index
009989e
..
b41c894
100644
(file)
--- a/
src/main/parser.c
+++ b/
src/main/parser.c
@@
-54,7
+54,14
@@
size_t fr_cond_sprint(char *buffer, size_t bufsize, fr_cond_t const *in)
char *end = buffer + bufsize - 1;
fr_cond_t const *c = in;
+ rad_assert(buffsize > 0);
+
next:
+ if (!c) {
+ buffer[0] = '\0';
+ return 0;
+ }
+
if (c->negate) {
*(p++) = '!'; /* FIXME: only allow for child? */
}