projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c9bf24
)
Better printing of octets
author
aland
<aland>
Wed, 3 May 2006 17:34:48 +0000
(17:34 +0000)
committer
aland
<aland>
Wed, 3 May 2006 17:34:48 +0000
(17:34 +0000)
src/lib/filters.c
patch
|
blob
|
history
diff --git
a/src/lib/filters.c
b/src/lib/filters.c
index
31a503c
..
233eff9
100644
(file)
--- a/
src/lib/filters.c
+++ b/
src/lib/filters.c
@@
-1167,9
+1167,11
@@
void print_abinary(VALUE_PAIR *vp, char *buffer, int len)
if (vp->length != sizeof(*filter)) {
strcpy(p, "0x");
p += 2;
+ len -= 2;
for (i = 0; i < vp->length; i++) {
- sprintf(p, " %02x", vp->vp_octets[i]);
- p += 3;
+ snprintf(p, len, "%02x", vp->vp_octets[i]);
+ p += 2;
+ len -= 2;
}
return;
}