projects
/
cyrus-sasl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5fea781
)
fix printable predicate
author
Luke Howard
<lukeh@padl.com>
Tue, 21 Sep 2010 12:54:06 +0000
(14:54 +0200)
committer
Luke Howard
<lukeh@padl.com>
Tue, 21 Sep 2010 12:54:06 +0000
(14:54 +0200)
mech_eap/util_radius.cpp
patch
|
blob
|
history
diff --git
a/mech_eap/util_radius.cpp
b/mech_eap/util_radius.cpp
index
c9aec8d
..
8769650
100644
(file)
--- a/
mech_eap/util_radius.cpp
+++ b/
mech_eap/util_radius.cpp
@@
-234,10
+234,17
@@
static bool
isPrintableAttributeP(VALUE_PAIR *vp)
{
size_t i;
+ int gotChar = 0;
for (i = 0; i < sizeof(vp->strvalue); i++) {
+ if (gotChar && vp->strvalue[i] == '\0')
+ return true;
+
if (!isprint(vp->strvalue[i]))
return false;
+
+ if (!gotChar)
+ gotChar++;
}
return true;