...
|
...
|
@@ -121,12 +121,10 @@ int cli_parse_add(struct cli_matcher *root, const char *virname, const char *hex
|
121
|
121
|
unsigned int i, j, hexlen, parts = 0;
|
122
|
122
|
int mindist = 0, maxdist = 0, error = 0;
|
123
|
123
|
|
124
|
|
- cli_errmsg("==== cli_parse add called with hexsig: \"%s\" ====\n", hexsig);
|
125
|
|
-
|
126
|
124
|
hexlen = strlen(hexsig);
|
127
|
125
|
if (hexsig[0] == '$') {
|
128
|
126
|
/* macro */
|
129
|
|
- unsigned smin, smax, tid;
|
|
127
|
+ unsigned int smin, smax, tid;
|
130
|
128
|
struct cli_ac_patt *patt;
|
131
|
129
|
|
132
|
130
|
if (hexsig[hexlen-1] != '$') {
|
...
|
...
|
@@ -139,8 +137,7 @@ int cli_parse_add(struct cli_matcher *root, const char *virname, const char *hex
|
139
|
139
|
return CL_EMALFDB;
|
140
|
140
|
}
|
141
|
141
|
|
142
|
|
- if (sscanf(hexsig,"${%u-%u}%u$",
|
143
|
|
- &smin, &smax, &tid) != 3) {
|
|
142
|
+ if (sscanf(hexsig,"${%u-%u}%u$", &smin, &smax, &tid) != 3) {
|
144
|
143
|
cli_errmsg("cli_parseadd(): invalid macro signature format\n");
|
145
|
144
|
return CL_EMALFDB;
|
146
|
145
|
}
|
...
|
...
|
@@ -174,8 +171,9 @@ int cli_parse_add(struct cli_matcher *root, const char *virname, const char *hex
|
174
|
174
|
return ret;
|
175
|
175
|
}
|
176
|
176
|
|
177
|
|
- return CL_SUCCESS;
|
|
177
|
+ return CL_SUCCESS;
|
178
|
178
|
}
|
|
179
|
+
|
179
|
180
|
if((wild = strchr(hexsig, '{'))) {
|
180
|
181
|
if(sscanf(wild, "%c%u%c", &l, &range, &r) == 3 && l == '{' && r == '}' && range > 0 && range < 128) {
|
181
|
182
|
hexcpy = cli_calloc(hexlen + 2 * range, sizeof(char));
|