projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8da9c81
)
Move to snprintf. Change to use vp_octets, which is unsigned
author
aland
<aland>
Thu, 22 Nov 2007 15:37:51 +0000
(15:37 +0000)
committer
aland
<aland>
Thu, 22 Nov 2007 15:37:51 +0000
(15:37 +0000)
src/lib/print.c
patch
|
blob
|
history
diff --git
a/src/lib/print.c
b/src/lib/print.c
index
758485b
..
abebd27
100644
(file)
--- a/
src/lib/print.c
+++ b/
src/lib/print.c
@@
-315,7
+315,8
@@
int vp_prints_value(char * out, int outlen, VALUE_PAIR *vp, int delimitst)
a = inet_ntop(AF_INET6, &addr, buf, sizeof(buf));
if (a) {
char *p = buf + strlen(buf);
- sprintf(p, "/%u", (unsigned int) vp->vp_strvalue[1]);
+ snprintf(p, buf + sizeof(buf) - p - 1, "/%u",
+ (unsigned int) vp->vp_octets[1]);
}
}
break;