default:
if ((p[1] >= '0') && (p[1] <= '9') &&
- (sscanf(p, "%3o", &x) == 1)) {
+ (sscanf(p + 1, "%3o", &x) == 1)) {
*q++ = x;
p += 2;
} else {
/*
* May not may not be found, but it *is* a known name.
*/
- *vp_p = pairfind(vps, da->attr);
+ *vp_p = pairfind(vps, da->attr, da->vendor);
return TRUE;
}
int cflags, int modreturn)
{
int result;
- int lint, rint;
+ uint32_t lint, rint;
VALUE_PAIR *vp = NULL;
#ifdef HAVE_REGEX_H
char buffer[1024];
* If so, try looking for it.
*/
da = dict_attrbyname(pleft);
- if (da && radius_find_compare(da->attr)) {
+ if (da && (da->vendor == 0) && radius_find_compare(da->attr)) {
VALUE_PAIR *check = pairmake(pleft, pright, token);
*presult = (radius_callback_compare(request, NULL, check, NULL, NULL) == 0);
RDEBUG3(" Callback returns %d",
RDEBUG2(" (Attribute %s was not found)",
pleft);
- return FALSE;
+ *presult = 0;
+ return TRUE;
}
#ifdef HAVE_REGEX_H
RDEBUG2(" (Right field is not a number at: %s)", pright);
return FALSE;
}
- rint = atoi(pright);
+ rint = strtoul(pright, NULL, 0);
if (!all_digits(pleft)) {
RDEBUG2(" (Left field is not a number at: %s)", pleft);
return FALSE;
}
- lint = atoi(pleft);
+ lint = strtoul(pleft, NULL, 0);
break;
default:
* Check for truth or falsehood.
*/
if (all_digits(pleft)) {
- lint = atoi(pleft);
+ lint = strtoul(pleft, NULL, 0);
result = (lint != 0);
} else {