int res;
regex_t cre;
#endif
+ char buffer[64];
+ const char *attrname = attribute;
/*
* Check for tags in 'Attribute:Tag' format.
}
if (ts && ts[1]) {
+ strlcpy(buffer, attribute, sizeof(buffer));
+ attrname = buffer;
+ ts = strrchr(attrname, ':');
+
/* Colon found with something behind it */
if (ts[1] == '*' && ts[2] == 0) {
/* Wildcard tag for check items */
* It's not found in the dictionary, so we use
* another method to create the attribute.
*/
- if ((da = dict_attrbyname(attribute)) == NULL) {
- return pairmake_any(attribute, value, operator);
+ if ((da = dict_attrbyname(attrname)) == NULL) {
+ return pairmake_any(attrname, value, operator);
}
if ((vp = pairalloc(da)) == NULL) {
}
regfree(&cre);
#else
- librad_log("Regelar expressions not enabled in this build, error in attribute %s",
+ librad_log("Regular expressions not enabled in this build, error in attribute %s",
vp->name);
pairbasicfree(vp);
return NULL;