projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
49ba86a
)
Ensure there's room for a trailing 0
author
Alan T. DeKok
<aland@freeradius.org>
Mon, 1 Dec 2008 09:40:24 +0000
(10:40 +0100)
committer
Alan T. DeKok
<aland@freeradius.org>
Mon, 1 Dec 2008 16:47:24 +0000
(17:47 +0100)
This address Coverity #70. I don't think it will ever happen
due to the way the strings are being handled, but it never hurts
to be safe...
src/main/xlat.c
patch
|
blob
|
history
diff --git
a/src/main/xlat.c
b/src/main/xlat.c
index
1315894
..
934b98c
100644
(file)
--- a/
src/main/xlat.c
+++ b/
src/main/xlat.c
@@
-660,8
+660,8
@@
static void decode_attribute(const char **from, char **to, int freespace,
*/
int len1, len2;
size_t mylen = strlen(p);
- char *first = rad_malloc(mylen);
- char *second = rad_malloc(mylen);
+ char *first = rad_malloc(mylen
+ 1
);
+ char *second = rad_malloc(mylen
+ 1
);
int expand2 = FALSE;
len1 = rad_copy_variable(first, p);