projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
247560f
)
Parse a VALUE as an integer only if ALL of its characters
author
aland
<aland>
Sun, 26 Nov 2006 19:54:00 +0000
(19:54 +0000)
committer
aland
<aland>
Sun, 26 Nov 2006 19:54:00 +0000
(19:54 +0000)
are decimal digits
src/lib/valuepair.c
patch
|
blob
|
history
diff --git
a/src/lib/valuepair.c
b/src/lib/valuepair.c
index
5457770
..
2c67bde
100644
(file)
--- a/
src/lib/valuepair.c
+++ b/
src/lib/valuepair.c
@@
-706,7
+706,7
@@
VALUE_PAIR *pairparsevalue(VALUE_PAIR *vp, const char *value)
*
* Note that ALL integers are unsigned!
*/
- if (
isdigit((int) *
value)) {
+ if (
strspn(value, "0123456789") == strlen(
value)) {
vp->lvalue = (uint32_t) strtoul(value, NULL, 10);
vp->length = 4;
}