projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fcc1b9b
)
Ensure we leave room for the trailing NUL
author
Alan T. DeKok
<aland@freeradius.org>
Thu, 9 Sep 2010 12:33:03 +0000
(14:33 +0200)
committer
Alan T. DeKok
<aland@freeradius.org>
Thu, 9 Sep 2010 13:29:00 +0000
(15:29 +0200)
src/main/conffile.c
patch
|
blob
|
history
diff --git
a/src/main/conffile.c
b/src/main/conffile.c
index
4feed80
..
ee47afb
100644
(file)
--- a/
src/main/conffile.c
+++ b/
src/main/conffile.c
@@
-2589,7
+2589,7
@@
int cf_pair2xml(FILE *fp, const CONF_PAIR *cp)
char *p = buffer;
const char *q = cp->value;
- while (*q && (p < (buffer + sizeof(buffer)))) {
+ while (*q && (p < (buffer + sizeof(buffer)
- 1
))) {
if (q[0] == '&') {
memcpy(p, "&", 4);
p += 5;