Line | Source Code | Coverage |
---|
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | | - |
7 | static const short int escapes[] = { | - |
8 | 0, 0, | - |
9 | 0, 0, | - |
10 | 0, 0, | - |
11 | 0, 0, | - |
12 | 0, 0, | - |
13 | '\072', '\073', | - |
14 | '\074', '\075', | - |
15 | '\076', '\077', | - |
16 | '\100', -ESC_A, | - |
17 | -ESC_B, -ESC_C, | - |
18 | -ESC_D, -ESC_E, | - |
19 | 0, -ESC_G, | - |
20 | -ESC_H, 0, | - |
21 | 0, -ESC_K, | - |
22 | 0, 0, | - |
23 | -ESC_N, 0, | - |
24 | -ESC_P, -ESC_Q, | - |
25 | -ESC_R, -ESC_S, | - |
26 | 0, 0, | - |
27 | -ESC_V, -ESC_W, | - |
28 | -ESC_X, 0, | - |
29 | -ESC_Z, '\133', | - |
30 | '\134', '\135', | - |
31 | '\136', '\137', | - |
32 | '\140', 7, | - |
33 | -ESC_b, 0, | - |
34 | -ESC_d, '\033', | - |
35 | '\014', 0, | - |
36 | -ESC_h, 0, | - |
37 | 0, -ESC_k, | - |
38 | 0, 0, | - |
39 | '\012', 0, | - |
40 | -ESC_p, 0, | - |
41 | '\015', -ESC_s, | - |
42 | '\011', 0, | - |
43 | -ESC_v, -ESC_w, | - |
44 | 0, 0, | - |
45 | -ESC_z | - |
46 | }; | - |
47 | typedef struct verbitem { | - |
48 | int len; | - |
49 | int op; | - |
50 | int op_arg; | - |
51 | } verbitem; | - |
52 | | - |
53 | static const char verbnames[] = | - |
54 | "\0" | - |
55 | "\115" "\101" "\122" "\113" "\0" | - |
56 | "\101" "\103" "\103" "\105" "\120" "\124" "\0" | - |
57 | "\103" "\117" "\115" "\115" "\111" "\124" "\0" | - |
58 | "\106" "\0" | - |
59 | "\106" "\101" "\111" "\114" "\0" | - |
60 | "\120" "\122" "\125" "\116" "\105" "\0" | - |
61 | "\123" "\113" "\111" "\120" "\0" | - |
62 | "\124" "\110" "\105" "\116"; | - |
63 | | - |
64 | static const verbitem verbs[] = { | - |
65 | { 0, -1, OP_MARK }, | - |
66 | { 4, -1, OP_MARK }, | - |
67 | { 6, OP_ACCEPT, -1 }, | - |
68 | { 6, OP_COMMIT, -1 }, | - |
69 | { 1, OP_FAIL, -1 }, | - |
70 | { 4, OP_FAIL, -1 }, | - |
71 | { 5, OP_PRUNE, OP_PRUNE_ARG }, | - |
72 | { 4, OP_SKIP, OP_SKIP_ARG }, | - |
73 | { 4, OP_THEN, OP_THEN_ARG } | - |
74 | }; | - |
75 | | - |
76 | static const int verbcount = sizeof(verbs)/sizeof(verbitem); | - |
77 | static const char posix_names[] = | - |
78 | "\141" "\154" "\160" "\150" "\141" "\0" "\154" "\157" "\167" "\145" "\162" "\0" "\165" "\160" "\160" "\145" "\162" "\0" "\141" "\154" "\156" "\165" "\155" "\0" | - |
79 | "\141" "\163" "\143" "\151" "\151" "\0" "\142" "\154" "\141" "\156" "\153" "\0" "\143" "\156" "\164" "\162" "\154" "\0" "\144" "\151" "\147" "\151" "\164" "\0" | - |
80 | "\147" "\162" "\141" "\160" "\150" "\0" "\160" "\162" "\151" "\156" "\164" "\0" "\160" "\165" "\156" "\143" "\164" "\0" "\163" "\160" "\141" "\143" "\145" "\0" | - |
81 | "\167" "\157" "\162" "\144" "\0" "\170" "\144" "\151" "\147" "\151" "\164"; | - |
82 | | - |
83 | static const pcre_uint8 posix_name_lengths[] = { | - |
84 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 6, 0 }; | - |
85 | static const int posix_class_maps[] = { | - |
86 | 160, 64, -2, | - |
87 | 128, -1, 0, | - |
88 | 96, -1, 0, | - |
89 | 160, -1, 2, | - |
90 | 224, 288, 0, | - |
91 | 0, -1, 1, | - |
92 | 288, -1, 0, | - |
93 | 64, -1, 0, | - |
94 | 192, -1, 0, | - |
95 | 224, -1, 0, | - |
96 | 256, -1, 0, | - |
97 | 0, -1, 0, | - |
98 | 160, -1, 0, | - |
99 | 32,-1, 0 | - |
100 | }; | - |
101 | | - |
102 | | - |
103 | | - |
104 | | - |
105 | | - |
106 | | - |
107 | static const pcre_uchar string_PNd[] = { | - |
108 | '\134', '\120', '\173', | - |
109 | '\116', '\144', '\175', '\0' }; | - |
110 | static const pcre_uchar string_pNd[] = { | - |
111 | '\134', '\160', '\173', | - |
112 | '\116', '\144', '\175', '\0' }; | - |
113 | static const pcre_uchar string_PXsp[] = { | - |
114 | '\134', '\120', '\173', | - |
115 | '\130', '\163', '\160', '\175', '\0' }; | - |
116 | static const pcre_uchar string_pXsp[] = { | - |
117 | '\134', '\160', '\173', | - |
118 | '\130', '\163', '\160', '\175', '\0' }; | - |
119 | static const pcre_uchar string_PXwd[] = { | - |
120 | '\134', '\120', '\173', | - |
121 | '\130', '\167', '\144', '\175', '\0' }; | - |
122 | static const pcre_uchar string_pXwd[] = { | - |
123 | '\134', '\160', '\173', | - |
124 | '\130', '\167', '\144', '\175', '\0' }; | - |
125 | | - |
126 | static const pcre_uchar *substitutes[] = { | - |
127 | string_PNd, | - |
128 | string_pNd, | - |
129 | string_PXsp, | - |
130 | string_pXsp, | - |
131 | string_PXwd, | - |
132 | string_pXwd | - |
133 | }; | - |
134 | | - |
135 | static const pcre_uchar string_pL[] = { | - |
136 | '\134', '\160', '\173', | - |
137 | '\114', '\175', '\0' }; | - |
138 | static const pcre_uchar string_pLl[] = { | - |
139 | '\134', '\160', '\173', | - |
140 | '\114', '\154', '\175', '\0' }; | - |
141 | static const pcre_uchar string_pLu[] = { | - |
142 | '\134', '\160', '\173', | - |
143 | '\114', '\165', '\175', '\0' }; | - |
144 | static const pcre_uchar string_pXan[] = { | - |
145 | '\134', '\160', '\173', | - |
146 | '\130', '\141', '\156', '\175', '\0' }; | - |
147 | static const pcre_uchar string_h[] = { | - |
148 | '\134', '\150', '\0' }; | - |
149 | static const pcre_uchar string_pXps[] = { | - |
150 | '\134', '\160', '\173', | - |
151 | '\130', '\160', '\163', '\175', '\0' }; | - |
152 | static const pcre_uchar string_PL[] = { | - |
153 | '\134', '\120', '\173', | - |
154 | '\114', '\175', '\0' }; | - |
155 | static const pcre_uchar string_PLl[] = { | - |
156 | '\134', '\120', '\173', | - |
157 | '\114', '\154', '\175', '\0' }; | - |
158 | static const pcre_uchar string_PLu[] = { | - |
159 | '\134', '\120', '\173', | - |
160 | '\114', '\165', '\175', '\0' }; | - |
161 | static const pcre_uchar string_PXan[] = { | - |
162 | '\134', '\120', '\173', | - |
163 | '\130', '\141', '\156', '\175', '\0' }; | - |
164 | static const pcre_uchar string_H[] = { | - |
165 | '\134', '\110', '\0' }; | - |
166 | static const pcre_uchar string_PXps[] = { | - |
167 | '\134', '\120', '\173', | - |
168 | '\130', '\160', '\163', '\175', '\0' }; | - |
169 | | - |
170 | static const pcre_uchar *posix_substitutes[] = { | - |
171 | string_pL, | - |
172 | string_pLl, | - |
173 | string_pLu, | - |
174 | string_pXan, | - |
175 | ((void *)0), | - |
176 | string_h, | - |
177 | ((void *)0), | - |
178 | string_pNd, | - |
179 | ((void *)0), | - |
180 | ((void *)0), | - |
181 | ((void *)0), | - |
182 | string_pXps, | - |
183 | string_pXwd, | - |
184 | ((void *)0), | - |
185 | | - |
186 | string_PL, | - |
187 | string_PLl, | - |
188 | string_PLu, | - |
189 | string_PXan, | - |
190 | ((void *)0), | - |
191 | string_H, | - |
192 | ((void *)0), | - |
193 | string_PNd, | - |
194 | ((void *)0), | - |
195 | ((void *)0), | - |
196 | ((void *)0), | - |
197 | string_PXps, | - |
198 | string_PXwd, | - |
199 | ((void *)0) | - |
200 | }; | - |
201 | static const char error_texts[] = | - |
202 | "no error\0" | - |
203 | "\\ at end of pattern\0" | - |
204 | "\\c at end of pattern\0" | - |
205 | "unrecognized character follows \\\0" | - |
206 | "numbers out of order in {} quantifier\0" | - |
207 | | - |
208 | "number too big in {} quantifier\0" | - |
209 | "missing terminating ] for character class\0" | - |
210 | "invalid escape sequence in character class\0" | - |
211 | "range out of order in character class\0" | - |
212 | "nothing to repeat\0" | - |
213 | | - |
214 | "operand of unlimited repeat could match the empty string\0" | - |
215 | "internal error: unexpected repeat\0" | - |
216 | "unrecognized character after (? or (?-\0" | - |
217 | "POSIX named classes are supported only within a class\0" | - |
218 | "missing )\0" | - |
219 | | - |
220 | "reference to non-existent subpattern\0" | - |
221 | "erroffset passed as NULL\0" | - |
222 | "unknown option bit(s) set\0" | - |
223 | "missing ) after comment\0" | - |
224 | "parentheses nested too deeply\0" | - |
225 | | - |
226 | "regular expression is too large\0" | - |
227 | "failed to get memory\0" | - |
228 | "unmatched parentheses\0" | - |
229 | "internal error: code overflow\0" | - |
230 | "unrecognized character after (?<\0" | - |
231 | | - |
232 | "lookbehind assertion is not fixed length\0" | - |
233 | "malformed number or name after (?(\0" | - |
234 | "conditional group contains more than two branches\0" | - |
235 | "assertion expected after (?(\0" | - |
236 | "(?R or (?[+-]digits must be followed by )\0" | - |
237 | | - |
238 | "unknown POSIX class name\0" | - |
239 | "POSIX collating elements are not supported\0" | - |
240 | "this version of PCRE is compiled without UTF support\0" | - |
241 | "spare error\0" | - |
242 | "character value in \\x{...} sequence is too large\0" | - |
243 | | - |
244 | "invalid condition (?(0)\0" | - |
245 | "\\C not allowed in lookbehind assertion\0" | - |
246 | "PCRE does not support \\L, \\l, \\N{name}, \\U, or \\u\0" | - |
247 | "number after (?C is > 255\0" | - |
248 | "closing ) for (?C expected\0" | - |
249 | | - |
250 | "recursive call could loop indefinitely\0" | - |
251 | "unrecognized character after (?P\0" | - |
252 | "syntax error in subpattern name (missing terminator)\0" | - |
253 | "two named subpatterns have the same name\0" | - |
254 | "invalid UTF-8 string\0" | - |
255 | | - |
256 | "support for \\P, \\p, and \\X has not been compiled\0" | - |
257 | "malformed \\P or \\p sequence\0" | - |
258 | "unknown property name after \\P or \\p\0" | - |
259 | "subpattern name is too long (maximum " "32" " characters)\0" | - |
260 | "too many named subpatterns (maximum " "10000" ")\0" | - |
261 | | - |
262 | "repeated subpattern is too long\0" | - |
263 | "octal value is greater than \\377 in 8-bit non-UTF-8 mode\0" | - |
264 | "internal error: overran compiling workspace\0" | - |
265 | "internal error: previously-checked referenced subpattern not found\0" | - |
266 | "DEFINE group contains more than one branch\0" | - |
267 | | - |
268 | "repeating a DEFINE group is not allowed\0" | - |
269 | "inconsistent NEWLINE options\0" | - |
270 | "\\g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number\0" | - |
271 | "a numbered reference must not be zero\0" | - |
272 | "an argument is not allowed for (*ACCEPT), (*FAIL), or (*COMMIT)\0" | - |
273 | | - |
274 | "(*VERB) not recognized\0" | - |
275 | "number is too big\0" | - |
276 | "subpattern name expected\0" | - |
277 | "digit expected after (?+\0" | - |
278 | "] is an invalid data character in JavaScript compatibility mode\0" | - |
279 | | - |
280 | "different names for subpatterns of the same number are not allowed\0" | - |
281 | "(*MARK) must have an argument\0" | - |
282 | "this version of PCRE is not compiled with Unicode property support\0" | - |
283 | "\\c must be followed by an ASCII character\0" | - |
284 | "\\k is not followed by a braced, angle-bracketed, or quoted name\0" | - |
285 | | - |
286 | "internal error: unknown opcode in find_fixedlength()\0" | - |
287 | "\\N is not supported in a class\0" | - |
288 | "too many forward references\0" | - |
289 | "disallowed Unicode code point (>= 0xd800 && <= 0xdfff)\0" | - |
290 | "invalid UTF-16 string\0" | - |
291 | ; | - |
292 | static const pcre_uint8 digitab[] = | - |
293 | { | - |
294 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | - |
295 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | - |
296 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | - |
297 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | - |
298 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | - |
299 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | - |
300 | 0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c, | - |
301 | 0x0c,0x0c,0x00,0x00,0x00,0x00,0x00,0x00, | - |
302 | 0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x00, | - |
303 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | - |
304 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | - |
305 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | - |
306 | 0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x00, | - |
307 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | - |
308 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | - |
309 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | - |
310 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | - |
311 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | - |
312 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | - |
313 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | - |
314 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | - |
315 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | - |
316 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | - |
317 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | - |
318 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | - |
319 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | - |
320 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | - |
321 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | - |
322 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | - |
323 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | - |
324 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | - |
325 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; | - |
326 | static BOOL | - |
327 | compile_regex(int, pcre_uchar **, const pcre_uchar **, int *, BOOL, BOOL, int, int, | - |
328 | int *, int *, branch_chain *, compile_data *, int *); | - |
329 | static const char * | - |
330 | find_error_text(int n) | - |
331 | { | - |
332 | const char *s = error_texts; | - |
333 | for (; n > 0; n--) evaluated: n > 0 yes Evaluation Count:198 | yes Evaluation Count:12 |
| 12-198 |
334 | { | - |
335 | while (*s++ != 0) {}; executed: } Execution Count:6590 evaluated: *s++ != 0 yes Evaluation Count:6590 | yes Evaluation Count:198 |
| 198-6590 |
336 | if (*s == 0) return "Error text not found (please report)"; never executed: return "Error text not found (please report)"; partially evaluated: *s == 0 no Evaluation Count:0 | yes Evaluation Count:198 |
| 0-198 |
337 | } executed: } Execution Count:198 | 198 |
338 | return s; executed: return s; Execution Count:12 | 12 |
339 | } | - |
340 | static int | - |
341 | expand_workspace(compile_data *cd) | - |
342 | { | - |
343 | pcre_uchar *newspace; | - |
344 | int newsize = cd->workspace_size * 2; | - |
345 | | - |
346 | if (newsize > (100*(2048*1))) newsize = (100*(2048*1)); never evaluated: newsize > (100*(2048*1)) never executed: newsize = (100*(2048*1)); | 0 |
347 | if (cd->workspace_size >= (100*(2048*1)) || never evaluated: cd->workspace_size >= (100*(2048*1)) | 0 |
348 | newsize - cd->workspace_size < (100)) never evaluated: newsize - cd->workspace_size < (100) | 0 |
349 | return ERR72; never executed: return ERR72; | 0 |
350 | | - |
351 | newspace = (pcre16_malloc)(((newsize) << 1)); | - |
352 | if (newspace == ((void *)0)) return ERR21; never evaluated: newspace == ((void *)0) never executed: return ERR21; | 0 |
353 | memcpy(newspace, cd->start_workspace, cd->workspace_size * sizeof(pcre_uchar)); | - |
354 | cd->hwm = (pcre_uchar *)newspace + (cd->hwm - cd->start_workspace); | - |
355 | if (cd->workspace_size > (2048*1)) never evaluated: cd->workspace_size > (2048*1) | 0 |
356 | (pcre16_free)((void *)cd->start_workspace); never executed: (pcre16_free)((void *)cd->start_workspace); | 0 |
357 | cd->start_workspace = newspace; | - |
358 | cd->workspace_size = newsize; | - |
359 | return 0; never executed: return 0; | 0 |
360 | } | - |
361 | static BOOL | - |
362 | is_counted_repeat(const pcre_uchar *p) | - |
363 | { | - |
364 | if (!((*p) >= '\060' && (*p) <= '\071')) return 0; evaluated: (*p) >= '\060' yes Evaluation Count:24 | yes Evaluation Count:2 |
partially evaluated: (*p) <= '\071' yes Evaluation Count:24 | no Evaluation Count:0 |
executed: return 0; Execution Count:2 | 0-24 |
365 | p++; | - |
366 | while (((*p) >= '\060' && (*p) <= '\071')) p++; evaluated: (*p) >= '\060' yes Evaluation Count:16 | yes Evaluation Count:8 |
partially evaluated: (*p) <= '\071' no Evaluation Count:0 | yes Evaluation Count:16 |
| 0-16 |
367 | if (*p == '\175') return 1; evaluated: *p == '\175' yes Evaluation Count:16 | yes Evaluation Count:8 |
executed: return 1; Execution Count:16 | 8-16 |
368 | | - |
369 | if (*p++ != '\054') return 0; partially evaluated: *p++ != '\054' no Evaluation Count:0 | yes Evaluation Count:8 |
never executed: return 0; | 0-8 |
370 | if (*p == '\175') return 1; partially evaluated: *p == '\175' no Evaluation Count:0 | yes Evaluation Count:8 |
never executed: return 1; | 0-8 |
371 | | - |
372 | if (!((*p) >= '\060' && (*p) <= '\071')) return 0; never executed: return 0; partially evaluated: (*p) >= '\060' yes Evaluation Count:8 | no Evaluation Count:0 |
partially evaluated: (*p) <= '\071' yes Evaluation Count:8 | no Evaluation Count:0 |
| 0-8 |
373 | p++; | - |
374 | while (((*p) >= '\060' && (*p) <= '\071')) p++; partially evaluated: (*p) >= '\060' yes Evaluation Count:8 | no Evaluation Count:0 |
partially evaluated: (*p) <= '\071' no Evaluation Count:0 | yes Evaluation Count:8 |
| 0-8 |
375 | | - |
376 | return (*p == '\175'); executed: return (*p == '\175'); Execution Count:8 | 8 |
377 | } | - |
378 | static int | - |
379 | check_escape(const pcre_uchar **ptrptr, int *errorcodeptr, int bracount, | - |
380 | int options, BOOL isclass) | - |
381 | { | - |
382 | | - |
383 | BOOL utf = (options & 0x00000800) != 0; | - |
384 | const pcre_uchar *ptr = *ptrptr + 1; | - |
385 | pcre_int32 c; | - |
386 | int i; | - |
387 | | - |
388 | c = *ptr++; if (utf && (c & 0xfc00) == 0xd800) { c = (((c & 0x3ff) << 10) | (*ptr++ & 0x3ff)) + 0x10000; };; partially evaluated: utf yes Evaluation Count:976 | no Evaluation Count:0 |
evaluated: (c & 0xfc00) == 0xd800 yes Evaluation Count:6 | yes Evaluation Count:970 |
executed: } Execution Count:6 | 0-976 |
389 | ptr--; | - |
390 | | - |
391 | | - |
392 | | - |
393 | if (c == 0) *errorcodeptr = ERR1; evaluated: c == 0 yes Evaluation Count:7 | yes Evaluation Count:969 |
executed: *errorcodeptr = ERR1; Execution Count:7 | 7-969 |
394 | | - |
395 | | - |
396 | | - |
397 | | - |
398 | | - |
399 | | - |
400 | | - |
401 | else if (c < '\060' || c > '\172') {} evaluated: c < '\060' yes Evaluation Count:266 | yes Evaluation Count:703 |
evaluated: c > '\172' yes Evaluation Count:40 | yes Evaluation Count:663 |
executed: } Execution Count:306 | 40-703 |
402 | else if ((i = escapes[c - '\060']) != 0) c = i; evaluated: (i = escapes[c - '\060']) != 0 yes Evaluation Count:643 | yes Evaluation Count:20 |
executed: c = i; Execution Count:643 | 20-643 |
403 | else | - |
404 | { | - |
405 | const pcre_uchar *oldptr; | - |
406 | BOOL braced, negated; | - |
407 | | - |
408 | switch (c) | - |
409 | { | - |
410 | | - |
411 | | - |
412 | | - |
413 | case '\154': | - |
414 | case '\114': | - |
415 | *errorcodeptr = ERR37; | - |
416 | break; | 0 |
417 | | - |
418 | case '\165': | - |
419 | if ((options & 0x02000000) != 0) never evaluated: (options & 0x02000000) != 0 | 0 |
420 | { | - |
421 | | - |
422 | | - |
423 | if (((ptr[1]) <= 255u) && (digitab[ptr[1]] & 0x08) != 0 never evaluated: ((ptr[1]) <= 255u) never evaluated: (digitab[ptr[1]] & 0x08) != 0 | 0 |
424 | && ((ptr[2]) <= 255u) && (digitab[ptr[2]] & 0x08) != 0 never evaluated: ((ptr[2]) <= 255u) never evaluated: (digitab[ptr[2]] & 0x08) != 0 | 0 |
425 | && ((ptr[3]) <= 255u) && (digitab[ptr[3]] & 0x08) != 0 never evaluated: ((ptr[3]) <= 255u) never evaluated: (digitab[ptr[3]] & 0x08) != 0 | 0 |
426 | && ((ptr[4]) <= 255u) && (digitab[ptr[4]] & 0x08) != 0) never evaluated: ((ptr[4]) <= 255u) never evaluated: (digitab[ptr[4]] & 0x08) != 0 | 0 |
427 | { | - |
428 | c = 0; | - |
429 | for (i = 0; i < 4; ++i) | 0 |
430 | { | - |
431 | register int cc = *(++ptr); | - |
432 | | - |
433 | if (cc >= '\141') cc -= 32; never evaluated: cc >= '\141' never executed: cc -= 32; | 0 |
434 | c = (c << 4) + cc - ((cc < '\101')? '\060' : ('\101' - 10)); never evaluated: (cc < '\101') | 0 |
435 | | - |
436 | | - |
437 | | - |
438 | | - |
439 | } | 0 |
440 | } | 0 |
441 | } | 0 |
442 | else | - |
443 | *errorcodeptr = ERR37; never executed: *errorcodeptr = ERR37; | 0 |
444 | break; | 0 |
445 | | - |
446 | case '\125': | - |
447 | | - |
448 | if ((options & 0x02000000) == 0) *errorcodeptr = ERR37; never evaluated: (options & 0x02000000) == 0 never executed: *errorcodeptr = ERR37; | 0 |
449 | break; | 0 |
450 | case '\147': | - |
451 | if (isclass) break; | 0 |
452 | if (ptr[1] == '\074' || ptr[1] == '\047') never evaluated: ptr[1] == '\074' never evaluated: ptr[1] == '\047' | 0 |
453 | { | - |
454 | c = -ESC_g; | - |
455 | break; | 0 |
456 | } | - |
457 | | - |
458 | | - |
459 | | - |
460 | if (ptr[1] == '\173') never evaluated: ptr[1] == '\173' | 0 |
461 | { | - |
462 | const pcre_uchar *p; | - |
463 | for (p = ptr+2; *p != 0 && *p != '\175'; p++) never evaluated: *p != '\175' | 0 |
464 | if (*p != '\055' && !((*p) >= '\060' && (*p) <= '\071')) break; never evaluated: *p != '\055' never evaluated: (*p) >= '\060' never evaluated: (*p) <= '\071' | 0 |
465 | if (*p != 0 && *p != '\175') never evaluated: *p != '\175' | 0 |
466 | { | - |
467 | c = -ESC_k; | - |
468 | break; | 0 |
469 | } | - |
470 | braced = 1; | - |
471 | ptr++; | - |
472 | } | 0 |
473 | else braced = 0; never executed: braced = 0; | 0 |
474 | | - |
475 | if (ptr[1] == '\055') never evaluated: ptr[1] == '\055' | 0 |
476 | { | - |
477 | negated = 1; | - |
478 | ptr++; | - |
479 | } | 0 |
480 | else negated = 0; never executed: negated = 0; | 0 |
481 | | - |
482 | | - |
483 | c = 0; | - |
484 | while (((ptr[1]) >= '\060' && (ptr[1]) <= '\071')) never evaluated: (ptr[1]) >= '\060' never evaluated: (ptr[1]) <= '\071' | 0 |
485 | { | - |
486 | if (((unsigned int)c) > 2147483647 / 10) never evaluated: ((unsigned int)c) > 2147483647 / 10 | 0 |
487 | { | - |
488 | c = -1; | - |
489 | break; | 0 |
490 | } | - |
491 | c = c * 10 + *(++ptr) - '\060'; | - |
492 | } | 0 |
493 | if (((unsigned int)c) > 2147483647) never evaluated: ((unsigned int)c) > 2147483647 | 0 |
494 | { | - |
495 | while (((ptr[1]) >= '\060' && (ptr[1]) <= '\071')) never evaluated: (ptr[1]) >= '\060' never evaluated: (ptr[1]) <= '\071' | 0 |
496 | ptr++; | 0 |
497 | *errorcodeptr = ERR61; | - |
498 | break; | 0 |
499 | } | - |
500 | | - |
501 | if (braced && *(++ptr) != '\175') never evaluated: *(++ptr) != '\175' | 0 |
502 | { | - |
503 | *errorcodeptr = ERR57; | - |
504 | break; | 0 |
505 | } | - |
506 | | - |
507 | if (c == 0) | 0 |
508 | { | - |
509 | *errorcodeptr = ERR58; | - |
510 | break; | 0 |
511 | } | - |
512 | | - |
513 | if (negated) | 0 |
514 | { | - |
515 | if (c > bracount) never evaluated: c > bracount | 0 |
516 | { | - |
517 | *errorcodeptr = ERR15; | - |
518 | break; | 0 |
519 | } | - |
520 | c = bracount - (c - 1); | - |
521 | } | 0 |
522 | | - |
523 | c = -(ESC_REF + c); | - |
524 | break; | 0 |
525 | case '\061': case '\062': case '\063': case '\064': case '\065': | - |
526 | case '\066': case '\067': case '\070': case '\071': | - |
527 | | - |
528 | if (!isclass) never evaluated: !isclass | 0 |
529 | { | - |
530 | oldptr = ptr; | - |
531 | | - |
532 | c -= '\060'; | - |
533 | while (((ptr[1]) >= '\060' && (ptr[1]) <= '\071')) never evaluated: (ptr[1]) >= '\060' never evaluated: (ptr[1]) <= '\071' | 0 |
534 | { | - |
535 | if (((unsigned int)c) > 2147483647 / 10) never evaluated: ((unsigned int)c) > 2147483647 / 10 | 0 |
536 | { | - |
537 | c = -1; | - |
538 | break; | 0 |
539 | } | - |
540 | c = c * 10 + *(++ptr) - '\060'; | - |
541 | } | 0 |
542 | if (((unsigned int)c) > 2147483647) never evaluated: ((unsigned int)c) > 2147483647 | 0 |
543 | { | - |
544 | while (((ptr[1]) >= '\060' && (ptr[1]) <= '\071')) never evaluated: (ptr[1]) >= '\060' never evaluated: (ptr[1]) <= '\071' | 0 |
545 | ptr++; | 0 |
546 | *errorcodeptr = ERR61; | - |
547 | break; | 0 |
548 | } | - |
549 | if (c < 10 || c <= bracount) never evaluated: c <= bracount | 0 |
550 | { | - |
551 | c = -(ESC_REF + c); | - |
552 | break; | 0 |
553 | } | - |
554 | ptr = oldptr; | - |
555 | } | 0 |
556 | | - |
557 | | - |
558 | | - |
559 | | - |
560 | | - |
561 | if ((c = *ptr) >= '\070') never evaluated: (c = *ptr) >= '\070' | 0 |
562 | { | - |
563 | ptr--; | - |
564 | c = 0; | - |
565 | break; | 0 |
566 | } | - |
567 | | - |
568 | | - |
569 | | - |
570 | | - |
571 | | - |
572 | | - |
573 | | - |
574 | case '\060': code before this statement never executed: case '\060': | 0 |
575 | c -= '\060'; | - |
576 | while(i++ < 2 && ptr[1] >= '\060' && ptr[1] <= '\067') partially evaluated: i++ < 2 yes Evaluation Count:12 | no Evaluation Count:0 |
partially evaluated: ptr[1] >= '\060' yes Evaluation Count:12 | no Evaluation Count:0 |
partially evaluated: ptr[1] <= '\067' no Evaluation Count:0 | yes Evaluation Count:12 |
| 0-12 |
577 | c = c * 8 + *(++ptr) - '\060'; never executed: c = c * 8 + *(++ptr) - '\060'; | 0 |
578 | | - |
579 | | - |
580 | | - |
581 | break; executed: break; Execution Count:12 | 12 |
582 | | - |
583 | | - |
584 | | - |
585 | | - |
586 | | - |
587 | case '\170': | - |
588 | if ((options & 0x02000000) != 0) partially evaluated: (options & 0x02000000) != 0 no Evaluation Count:0 | yes Evaluation Count:8 |
| 0-8 |
589 | { | - |
590 | | - |
591 | | - |
592 | if (((ptr[1]) <= 255u) && (digitab[ptr[1]] & 0x08) != 0 never evaluated: ((ptr[1]) <= 255u) never evaluated: (digitab[ptr[1]] & 0x08) != 0 | 0 |
593 | && ((ptr[2]) <= 255u) && (digitab[ptr[2]] & 0x08) != 0) never evaluated: ((ptr[2]) <= 255u) never evaluated: (digitab[ptr[2]] & 0x08) != 0 | 0 |
594 | { | - |
595 | c = 0; | - |
596 | for (i = 0; i < 2; ++i) | 0 |
597 | { | - |
598 | register int cc = *(++ptr); | - |
599 | | - |
600 | if (cc >= '\141') cc -= 32; never evaluated: cc >= '\141' never executed: cc -= 32; | 0 |
601 | c = (c << 4) + cc - ((cc < '\101')? '\060' : ('\101' - 10)); never evaluated: (cc < '\101') | 0 |
602 | | - |
603 | | - |
604 | | - |
605 | | - |
606 | } | 0 |
607 | } | 0 |
608 | break; | 0 |
609 | } | - |
610 | | - |
611 | if (ptr[1] == '\173') partially evaluated: ptr[1] == '\173' yes Evaluation Count:8 | no Evaluation Count:0 |
| 0-8 |
612 | { | - |
613 | const pcre_uchar *pt = ptr + 2; | - |
614 | | - |
615 | c = 0; | - |
616 | while (((*pt) <= 255u) && (digitab[*pt] & 0x08) != 0) partially evaluated: ((*pt) <= 255u) yes Evaluation Count:40 | no Evaluation Count:0 |
evaluated: (digitab[*pt] & 0x08) != 0 yes Evaluation Count:32 | yes Evaluation Count:8 |
| 0-40 |
617 | { | - |
618 | register int cc = *pt++; | - |
619 | if (c == 0 && cc == '\060') continue; evaluated: c == 0 yes Evaluation Count:20 | yes Evaluation Count:12 |
evaluated: cc == '\060' yes Evaluation Count:16 | yes Evaluation Count:4 |
executed: continue; Execution Count:16 | 4-20 |
620 | | - |
621 | | - |
622 | if (cc >= '\141') cc -= 32; partially evaluated: cc >= '\141' no Evaluation Count:0 | yes Evaluation Count:16 |
never executed: cc -= 32; | 0-16 |
623 | c = (c << 4) + cc - ((cc < '\101')? '\060' : ('\101' - 10)); partially evaluated: (cc < '\101') no Evaluation Count:0 | yes Evaluation Count:16 |
| 0-16 |
624 | if (c > (utf ? 0x10ffff : 0xffff)) { c = -1; break; } partially evaluated: c > (utf ? 0x10ffff : 0xffff) no Evaluation Count:0 | yes Evaluation Count:16 |
| 0-16 |
625 | | - |
626 | | - |
627 | } executed: } Execution Count:16 | 16 |
628 | | - |
629 | if (c < 0) partially evaluated: c < 0 no Evaluation Count:0 | yes Evaluation Count:8 |
| 0-8 |
630 | { | - |
631 | while (((*pt) <= 255u) && (digitab[*pt] & 0x08) != 0) pt++; never evaluated: ((*pt) <= 255u) never evaluated: (digitab[*pt] & 0x08) != 0 | 0 |
632 | *errorcodeptr = ERR34; | - |
633 | } | 0 |
634 | | - |
635 | if (*pt == '\175') partially evaluated: *pt == '\175' yes Evaluation Count:8 | no Evaluation Count:0 |
| 0-8 |
636 | { | - |
637 | if (utf && c >= 0xd800 && c <= 0xdfff) *errorcodeptr = ERR73; partially evaluated: utf yes Evaluation Count:8 | no Evaluation Count:0 |
evaluated: c >= 0xd800 yes Evaluation Count:4 | yes Evaluation Count:4 |
partially evaluated: c <= 0xdfff no Evaluation Count:0 | yes Evaluation Count:4 |
never executed: *errorcodeptr = ERR73; | 0-8 |
638 | ptr = pt; | - |
639 | break; executed: break; Execution Count:8 | 8 |
640 | } | - |
641 | | - |
642 | | - |
643 | | - |
644 | } | 0 |
645 | | - |
646 | | - |
647 | | - |
648 | c = 0; | - |
649 | while (i++ < 2 && ((ptr[1]) <= 255u) && (digitab[ptr[1]] & 0x08) != 0) never evaluated: ((ptr[1]) <= 255u) never evaluated: (digitab[ptr[1]] & 0x08) != 0 | 0 |
650 | { | - |
651 | int cc; | - |
652 | cc = *(++ptr); | - |
653 | | - |
654 | if (cc >= '\141') cc -= 32; never evaluated: cc >= '\141' never executed: cc -= 32; | 0 |
655 | c = c * 16 + cc - ((cc < '\101')? '\060' : ('\101' - 10)); never evaluated: (cc < '\101') | 0 |
656 | | - |
657 | | - |
658 | | - |
659 | | - |
660 | } | 0 |
661 | break; | 0 |
662 | | - |
663 | | - |
664 | | - |
665 | | - |
666 | | - |
667 | | - |
668 | case '\143': | - |
669 | c = *(++ptr); | - |
670 | if (c == 0) | 0 |
671 | { | - |
672 | *errorcodeptr = ERR2; | - |
673 | break; | 0 |
674 | } | - |
675 | | - |
676 | if (c > 127) | 0 |
677 | { | - |
678 | *errorcodeptr = ERR68; | - |
679 | break; | 0 |
680 | } | - |
681 | if (c >= '\141' && c <= '\172') c -= 32; never evaluated: c >= '\141' never evaluated: c <= '\172' | 0 |
682 | c ^= 0x40; | - |
683 | | - |
684 | | - |
685 | | - |
686 | | - |
687 | break; | 0 |
688 | | - |
689 | | - |
690 | | - |
691 | | - |
692 | | - |
693 | | - |
694 | | - |
695 | default: | - |
696 | if ((options & 0x00000040) != 0) switch(c) never evaluated: (options & 0x00000040) != 0 | 0 |
697 | { | - |
698 | default: | - |
699 | *errorcodeptr = ERR3; | - |
700 | break; | 0 |
701 | } | 0 |
702 | break; | 0 |
703 | } | - |
704 | } executed: } Execution Count:20 | 20 |
705 | | - |
706 | | - |
707 | | - |
708 | | - |
709 | | - |
710 | if (c == -ESC_N && ptr[1] == '\173' && partially evaluated: c == -ESC_N no Evaluation Count:0 | yes Evaluation Count:976 |
never evaluated: ptr[1] == '\173' | 0-976 |
711 | !is_counted_repeat(ptr+2)) never evaluated: !is_counted_repeat(ptr+2) | 0 |
712 | *errorcodeptr = ERR37; never executed: *errorcodeptr = ERR37; | 0 |
713 | | - |
714 | | - |
715 | | - |
716 | if ((options & 0x20000000) != 0 && c <= -ESC_D && c >= -ESC_w) evaluated: (options & 0x20000000) != 0 yes Evaluation Count:8 | yes Evaluation Count:968 |
partially evaluated: c <= -ESC_D yes Evaluation Count:8 | no Evaluation Count:0 |
evaluated: c >= -ESC_w yes Evaluation Count:4 | yes Evaluation Count:4 |
| 0-968 |
717 | c -= (ESC_DU - ESC_D); executed: c -= (ESC_DU - ESC_D); Execution Count:4 | 4 |
718 | | - |
719 | | - |
720 | | - |
721 | *ptrptr = ptr; | - |
722 | return c; executed: return c; Execution Count:976 | 976 |
723 | } | - |
724 | static int | - |
725 | get_ucp(const pcre_uchar **ptrptr, BOOL *negptr, int *dptr, int *errorcodeptr) | - |
726 | { | - |
727 | int c, i, bot, top; | - |
728 | const pcre_uchar *ptr = *ptrptr; | - |
729 | pcre_uchar name[32]; | - |
730 | | - |
731 | c = *(++ptr); | - |
732 | if (c == 0) goto ERROR_RETURN; partially evaluated: c == 0 no Evaluation Count:0 | yes Evaluation Count:7 |
never executed: goto ERROR_RETURN; | 0-7 |
733 | | - |
734 | *negptr = 0; | - |
735 | | - |
736 | | - |
737 | | - |
738 | | - |
739 | if (c == '\173') partially evaluated: c == '\173' yes Evaluation Count:7 | no Evaluation Count:0 |
| 0-7 |
740 | { | - |
741 | if (ptr[1] == '\136') partially evaluated: ptr[1] == '\136' no Evaluation Count:0 | yes Evaluation Count:7 |
| 0-7 |
742 | { | - |
743 | *negptr = 1; | - |
744 | ptr++; | - |
745 | } | 0 |
746 | for (i = 0; i < (int)(sizeof(name) / sizeof(pcre_uchar)) - 1; i++) partially evaluated: i < (int)(sizeof(name) / sizeof(pcre_uchar)) - 1 yes Evaluation Count:25 | no Evaluation Count:0 |
| 0-25 |
747 | { | - |
748 | c = *(++ptr); | - |
749 | if (c == 0) goto ERROR_RETURN; partially evaluated: c == 0 no Evaluation Count:0 | yes Evaluation Count:25 |
never executed: goto ERROR_RETURN; | 0-25 |
750 | if (c == '\175') break; evaluated: c == '\175' yes Evaluation Count:7 | yes Evaluation Count:18 |
executed: break; Execution Count:7 | 7-18 |
751 | name[i] = c; | - |
752 | } executed: } Execution Count:18 | 18 |
753 | if (c != '\175') goto ERROR_RETURN; partially evaluated: c != '\175' no Evaluation Count:0 | yes Evaluation Count:7 |
never executed: goto ERROR_RETURN; | 0-7 |
754 | name[i] = 0; | - |
755 | } executed: } Execution Count:7 | 7 |
756 | | - |
757 | | - |
758 | | - |
759 | else | - |
760 | { | - |
761 | name[0] = c; | - |
762 | name[1] = 0; | - |
763 | } | 0 |
764 | | - |
765 | *ptrptr = ptr; | - |
766 | | - |
767 | | - |
768 | | - |
769 | bot = 0; | - |
770 | top = _pcre16_utt_size; | - |
771 | | - |
772 | while (bot < top) evaluated: bot < top yes Evaluation Count:49 | yes Evaluation Count:1 |
| 1-49 |
773 | { | - |
774 | i = (bot + top) >> 1; | - |
775 | c = _pcre16_strcmp_uc_c8((name), (_pcre16_utt_names + _pcre16_utt[i].name_offset)); | - |
776 | if (c == 0) evaluated: c == 0 yes Evaluation Count:6 | yes Evaluation Count:43 |
| 6-43 |
777 | { | - |
778 | *dptr = _pcre16_utt[i].value; | - |
779 | return _pcre16_utt[i].type; executed: return _pcre16_utt[i].type; Execution Count:6 | 6 |
780 | } | - |
781 | if (c > 0) bot = i + 1; else top = i; evaluated: c > 0 yes Evaluation Count:20 | yes Evaluation Count:23 |
executed: bot = i + 1; Execution Count:20 executed: top = i; Execution Count:23 | 20-23 |
782 | } | - |
783 | | - |
784 | *errorcodeptr = ERR47; | - |
785 | *ptrptr = ptr; | - |
786 | return -1; executed: return -1; Execution Count:1 | 1 |
787 | | - |
788 | ERROR_RETURN: | - |
789 | *errorcodeptr = ERR46; | - |
790 | *ptrptr = ptr; | - |
791 | return -1; never executed: return -1; | 0 |
792 | } | - |
793 | static const pcre_uchar * | - |
794 | read_repeat_counts(const pcre_uchar *p, int *minp, int *maxp, int *errorcodeptr) | - |
795 | { | - |
796 | int min = 0; | - |
797 | int max = -1; | - |
798 | | - |
799 | | - |
800 | | - |
801 | | - |
802 | while (((*p) >= '\060' && (*p) <= '\071')) min = min * 10 + *p++ - '\060'; evaluated: (*p) >= '\060' yes Evaluation Count:40 | yes Evaluation Count:8 |
evaluated: (*p) <= '\071' yes Evaluation Count:24 | yes Evaluation Count:16 |
executed: min = min * 10 + *p++ - '\060'; Execution Count:24 | 8-40 |
803 | if (min < 0 || min > 65535) partially evaluated: min < 0 no Evaluation Count:0 | yes Evaluation Count:24 |
partially evaluated: min > 65535 no Evaluation Count:0 | yes Evaluation Count:24 |
| 0-24 |
804 | { | - |
805 | *errorcodeptr = ERR5; | - |
806 | return p; never executed: return p; | 0 |
807 | } | - |
808 | | - |
809 | | - |
810 | | - |
811 | | - |
812 | if (*p == '\175') max = min; else evaluated: *p == '\175' yes Evaluation Count:16 | yes Evaluation Count:8 |
executed: max = min; Execution Count:16 | 8-16 |
813 | { | - |
814 | if (*(++p) != '\175') partially evaluated: *(++p) != '\175' yes Evaluation Count:8 | no Evaluation Count:0 |
| 0-8 |
815 | { | - |
816 | max = 0; | - |
817 | while(((*p) >= '\060' && (*p) <= '\071')) max = max * 10 + *p++ - '\060'; partially evaluated: (*p) >= '\060' yes Evaluation Count:16 | no Evaluation Count:0 |
evaluated: (*p) <= '\071' yes Evaluation Count:8 | yes Evaluation Count:8 |
executed: max = max * 10 + *p++ - '\060'; Execution Count:8 | 0-16 |
818 | if (max < 0 || max > 65535) partially evaluated: max < 0 no Evaluation Count:0 | yes Evaluation Count:8 |
partially evaluated: max > 65535 no Evaluation Count:0 | yes Evaluation Count:8 |
| 0-8 |
819 | { | - |
820 | *errorcodeptr = ERR5; | - |
821 | return p; never executed: return p; | 0 |
822 | } | - |
823 | if (max < min) partially evaluated: max < min no Evaluation Count:0 | yes Evaluation Count:8 |
| 0-8 |
824 | { | - |
825 | *errorcodeptr = ERR4; | - |
826 | return p; never executed: return p; | 0 |
827 | } | - |
828 | } executed: } Execution Count:8 | 8 |
829 | } executed: } Execution Count:8 | 8 |
830 | | - |
831 | | - |
832 | | - |
833 | | - |
834 | *minp = min; | - |
835 | *maxp = max; | - |
836 | return p; executed: return p; Execution Count:24 | 24 |
837 | } | - |
838 | static int | - |
839 | find_parens_sub(pcre_uchar **ptrptr, compile_data *cd, const pcre_uchar *name, int lorn, | - |
840 | BOOL xmode, BOOL utf, int *count) | - |
841 | { | - |
842 | pcre_uchar *ptr = *ptrptr; | - |
843 | int start_count = *count; | - |
844 | int hwm_count = start_count; | - |
845 | BOOL dup_parens = 0; | - |
846 | | - |
847 | | - |
848 | | - |
849 | | - |
850 | if (ptr[0] == '\050') evaluated: ptr[0] == '\050' yes Evaluation Count:14 | yes Evaluation Count:2 |
| 2-14 |
851 | { | - |
852 | | - |
853 | | - |
854 | if (ptr[1] == '\052') ptr += 2; never executed: ptr += 2; partially evaluated: ptr[1] == '\052' no Evaluation Count:0 | yes Evaluation Count:14 |
| 0-14 |
855 | | - |
856 | | - |
857 | | - |
858 | else if (ptr[1] != '\077') evaluated: ptr[1] != '\077' yes Evaluation Count:4 | yes Evaluation Count:10 |
| 4-10 |
859 | { | - |
860 | *count += 1; | - |
861 | if (name == ((void *)0) && *count == lorn) return *count; executed: return *count; Execution Count:2 evaluated: name == ((void *)0) yes Evaluation Count:2 | yes Evaluation Count:2 |
partially evaluated: *count == lorn yes Evaluation Count:2 | no Evaluation Count:0 |
| 0-2 |
862 | ptr++; | - |
863 | } executed: } Execution Count:2 | 2 |
864 | | - |
865 | | - |
866 | | - |
867 | | - |
868 | else if (ptr[2] == '\174') partially evaluated: ptr[2] == '\174' no Evaluation Count:0 | yes Evaluation Count:10 |
| 0-10 |
869 | { | - |
870 | ptr += 3; | - |
871 | dup_parens = 1; | - |
872 | } | 0 |
873 | | - |
874 | | - |
875 | | - |
876 | else if (ptr[2] == '\043') partially evaluated: ptr[2] == '\043' no Evaluation Count:0 | yes Evaluation Count:10 |
| 0-10 |
877 | { | - |
878 | for (ptr += 3; *ptr != 0; ptr++) if (*ptr == '\051') break; never evaluated: *ptr == '\051' never evaluated: *ptr != 0 | 0 |
879 | goto FAIL_EXIT; never executed: goto FAIL_EXIT; | 0 |
880 | } | - |
881 | | - |
882 | | - |
883 | | - |
884 | | - |
885 | | - |
886 | else if (ptr[2] == '\050') evaluated: ptr[2] == '\050' yes Evaluation Count:4 | yes Evaluation Count:6 |
| 4-6 |
887 | { | - |
888 | ptr += 2; | - |
889 | if (ptr[1] != '\077') partially evaluated: ptr[1] != '\077' yes Evaluation Count:4 | no Evaluation Count:0 |
| 0-4 |
890 | { | - |
891 | while (*ptr != 0 && *ptr != '\051') ptr++; executed: ptr++; Execution Count:8 partially evaluated: *ptr != 0 yes Evaluation Count:12 | no Evaluation Count:0 |
evaluated: *ptr != '\051' yes Evaluation Count:8 | yes Evaluation Count:4 |
| 0-12 |
892 | if (*ptr != 0) ptr++; partially evaluated: *ptr != 0 yes Evaluation Count:4 | no Evaluation Count:0 |
executed: ptr++; Execution Count:4 | 0-4 |
893 | } executed: } Execution Count:4 | 4 |
894 | } executed: } Execution Count:4 | 4 |
895 | | - |
896 | | - |
897 | | - |
898 | else | - |
899 | { | - |
900 | ptr += 2; | - |
901 | if (*ptr == '\120') ptr++; partially evaluated: *ptr == '\120' no Evaluation Count:0 | yes Evaluation Count:6 |
| 0-6 |
902 | | - |
903 | | - |
904 | | - |
905 | if ((*ptr == '\074' && ptr[1] != '\041' && partially evaluated: *ptr == '\074' no Evaluation Count:0 | yes Evaluation Count:6 |
never evaluated: ptr[1] != '\041' | 0-6 |
906 | ptr[1] != '\075') || *ptr == '\047') never evaluated: ptr[1] != '\075' partially evaluated: *ptr == '\047' no Evaluation Count:0 | yes Evaluation Count:6 |
| 0-6 |
907 | { | - |
908 | int term; | - |
909 | const pcre_uchar *thisname; | - |
910 | *count += 1; | - |
911 | if (name == ((void *)0) && *count == lorn) return *count; never executed: return *count; never evaluated: name == ((void *)0) never evaluated: *count == lorn | 0 |
912 | term = *ptr++; | - |
913 | if (term == '\074') term = '\076'; never evaluated: term == '\074' never executed: term = '\076'; | 0 |
914 | thisname = ptr; | - |
915 | while (*ptr != term) ptr++; never evaluated: *ptr != term | 0 |
916 | if (name != ((void *)0) && lorn == ptr - thisname && never evaluated: name != ((void *)0) never evaluated: lorn == ptr - thisname | 0 |
917 | _pcre16_strncmp_uc_uc((name), (thisname), (lorn)) == 0) never evaluated: _pcre16_strncmp_uc_uc((name), (thisname), (lorn)) == 0 | 0 |
918 | return *count; never executed: return *count; | 0 |
919 | term++; | - |
920 | } | 0 |
921 | } executed: } Execution Count:6 | 6 |
922 | } | - |
923 | | - |
924 | | - |
925 | | - |
926 | | - |
927 | | - |
928 | | - |
929 | for (; ptr < cd->end_pattern; ptr++) evaluated: ptr < cd->end_pattern yes Evaluation Count:40 | yes Evaluation Count:2 |
| 2-40 |
930 | { | - |
931 | | - |
932 | | - |
933 | if (*ptr == '\134') partially evaluated: *ptr == '\134' no Evaluation Count:0 | yes Evaluation Count:40 |
| 0-40 |
934 | { | - |
935 | if (*(++ptr) == 0) goto FAIL_EXIT; never evaluated: *(++ptr) == 0 never executed: goto FAIL_EXIT; | 0 |
936 | if (*ptr == '\121') for (;;) never evaluated: *ptr == '\121' | 0 |
937 | { | - |
938 | while (*(++ptr) != 0 && *ptr != '\134') {}; never evaluated: *(++ptr) != 0 never evaluated: *ptr != '\134' | 0 |
939 | if (*ptr == 0) goto FAIL_EXIT; never evaluated: *ptr == 0 never executed: goto FAIL_EXIT; | 0 |
940 | if (*(++ptr) == '\105') break; never evaluated: *(++ptr) == '\105' | 0 |
941 | } | 0 |
942 | continue; never executed: continue; | 0 |
943 | } | - |
944 | | - |
945 | | - |
946 | | - |
947 | | - |
948 | | - |
949 | | - |
950 | | - |
951 | if (*ptr == '\133') partially evaluated: *ptr == '\133' no Evaluation Count:0 | yes Evaluation Count:40 |
| 0-40 |
952 | { | - |
953 | BOOL negate_class = 0; | - |
954 | for (;;) | - |
955 | { | - |
956 | if (ptr[1] == '\134') never evaluated: ptr[1] == '\134' | 0 |
957 | { | - |
958 | if (ptr[2] == '\105') never evaluated: ptr[2] == '\105' | 0 |
959 | ptr+= 2; | 0 |
960 | else if (_pcre16_strncmp_uc_c8((ptr + 2), ("\121" "\134" "\105"), (3)) == 0) never evaluated: _pcre16_strncmp_uc_c8((ptr + 2), ("\121" "\134" "\105"), (3)) == 0 | 0 |
961 | | - |
962 | ptr += 4; never executed: ptr += 4; | 0 |
963 | else | - |
964 | break; | 0 |
965 | } | - |
966 | else if (!negate_class && ptr[1] == '\136') never evaluated: !negate_class never evaluated: ptr[1] == '\136' | 0 |
967 | { | - |
968 | negate_class = 1; | - |
969 | ptr++; | - |
970 | } | 0 |
971 | else break; | 0 |
972 | } | - |
973 | | - |
974 | | - |
975 | | - |
976 | | - |
977 | if (ptr[1] == '\135' && never evaluated: ptr[1] == '\135' | 0 |
978 | (cd->external_options & 0x02000000) == 0) never evaluated: (cd->external_options & 0x02000000) == 0 | 0 |
979 | ptr++; | 0 |
980 | | - |
981 | while (*(++ptr) != '\135') never evaluated: *(++ptr) != '\135' | 0 |
982 | { | - |
983 | if (*ptr == 0) return -1; never evaluated: *ptr == 0 never executed: return -1; | 0 |
984 | if (*ptr == '\134') never evaluated: *ptr == '\134' | 0 |
985 | { | - |
986 | if (*(++ptr) == 0) goto FAIL_EXIT; never evaluated: *(++ptr) == 0 never executed: goto FAIL_EXIT; | 0 |
987 | if (*ptr == '\121') for (;;) never evaluated: *ptr == '\121' | 0 |
988 | { | - |
989 | while (*(++ptr) != 0 && *ptr != '\134') {}; never evaluated: *(++ptr) != 0 never evaluated: *ptr != '\134' | 0 |
990 | if (*ptr == 0) goto FAIL_EXIT; never evaluated: *ptr == 0 never executed: goto FAIL_EXIT; | 0 |
991 | if (*(++ptr) == '\105') break; never evaluated: *(++ptr) == '\105' | 0 |
992 | } | 0 |
993 | continue; never executed: continue; | 0 |
994 | } | - |
995 | } | 0 |
996 | continue; never executed: continue; | 0 |
997 | } | - |
998 | | - |
999 | | - |
1000 | | - |
1001 | if (xmode && *ptr == '\043') partially evaluated: xmode no Evaluation Count:0 | yes Evaluation Count:40 |
never evaluated: *ptr == '\043' | 0-40 |
1002 | { | - |
1003 | ptr++; | - |
1004 | while (*ptr != 0) never evaluated: *ptr != 0 | 0 |
1005 | { | - |
1006 | if (((cd->nltype != 0)? ((ptr) < cd->end_pattern && _pcre16_is_newline((ptr), cd->nltype, cd->end_pattern, &(cd->nllen), utf)) : ((ptr) <= cd->end_pattern - cd->nllen && (ptr)[0] == cd->nl[0] && (cd->nllen == 1 || (ptr)[1] == cd->nl[1]) ) )) { ptr += cd->nllen - 1; break; } never evaluated: (cd->nltype != 0) | 0 |
1007 | ptr++; | - |
1008 | | - |
1009 | if (utf) if ((*ptr & 0xfc00) == 0xdc00) ptr++; never evaluated: (*ptr & 0xfc00) == 0xdc00 | 0 |
1010 | | - |
1011 | } | 0 |
1012 | if (*ptr == 0) goto FAIL_EXIT; never evaluated: *ptr == 0 never executed: goto FAIL_EXIT; | 0 |
1013 | continue; never executed: continue; | 0 |
1014 | } | - |
1015 | | - |
1016 | | - |
1017 | | - |
1018 | if (*ptr == '\050') evaluated: *ptr == '\050' yes Evaluation Count:10 | yes Evaluation Count:30 |
| 10-30 |
1019 | { | - |
1020 | int rc = find_parens_sub(&ptr, cd, name, lorn, xmode, utf, count); | - |
1021 | if (rc > 0) return rc; evaluated: rc > 0 yes Evaluation Count:2 | yes Evaluation Count:8 |
executed: return rc; Execution Count:2 | 2-8 |
1022 | if (*ptr == 0) goto FAIL_EXIT; partially evaluated: *ptr == 0 no Evaluation Count:0 | yes Evaluation Count:8 |
never executed: goto FAIL_EXIT; | 0-8 |
1023 | } executed: } Execution Count:8 | 8 |
1024 | | - |
1025 | else if (*ptr == '\051') evaluated: *ptr == '\051' yes Evaluation Count:10 | yes Evaluation Count:20 |
| 10-20 |
1026 | { | - |
1027 | if (dup_parens && *count < hwm_count) *count = hwm_count; never executed: *count = hwm_count; partially evaluated: dup_parens no Evaluation Count:0 | yes Evaluation Count:10 |
never evaluated: *count < hwm_count | 0-10 |
1028 | goto FAIL_EXIT; executed: goto FAIL_EXIT; Execution Count:10 | 10 |
1029 | } | - |
1030 | | - |
1031 | else if (*ptr == '\174' && dup_parens) evaluated: *ptr == '\174' yes Evaluation Count:4 | yes Evaluation Count:16 |
partially evaluated: dup_parens no Evaluation Count:0 | yes Evaluation Count:4 |
| 0-16 |
1032 | { | - |
1033 | if (*count > hwm_count) hwm_count = *count; never evaluated: *count > hwm_count never executed: hwm_count = *count; | 0 |
1034 | *count = start_count; | - |
1035 | } | 0 |
1036 | } | - |
1037 | | - |
1038 | FAIL_EXIT: code before this statement executed: FAIL_EXIT: Execution Count:2 | 2 |
1039 | *ptrptr = ptr; | - |
1040 | return -1; executed: return -1; Execution Count:12 | 12 |
1041 | } | - |
1042 | static int | - |
1043 | find_parens(compile_data *cd, const pcre_uchar *name, int lorn, BOOL xmode, | - |
1044 | BOOL utf) | - |
1045 | { | - |
1046 | pcre_uchar *ptr = (pcre_uchar *)cd->start_pattern; | - |
1047 | int count = 0; | - |
1048 | int rc; | - |
1049 | | - |
1050 | | - |
1051 | | - |
1052 | | - |
1053 | | - |
1054 | | - |
1055 | for (;;) | - |
1056 | { | - |
1057 | rc = find_parens_sub(&ptr, cd, name, lorn, xmode, utf, &count); | - |
1058 | if (rc > 0 || *ptr++ == 0) break; executed: break; Execution Count:4 evaluated: rc > 0 yes Evaluation Count:2 | yes Evaluation Count:4 |
evaluated: *ptr++ == 0 yes Evaluation Count:2 | yes Evaluation Count:2 |
| 2-4 |
1059 | } executed: } Execution Count:2 | 2 |
1060 | | - |
1061 | return rc; executed: return rc; Execution Count:4 | 4 |
1062 | } | - |
1063 | static const pcre_uchar* | - |
1064 | first_significant_code(const pcre_uchar *code, BOOL skipassert) | - |
1065 | { | - |
1066 | for (;;) | - |
1067 | { | - |
1068 | switch ((int)*code) | - |
1069 | { | - |
1070 | case OP_ASSERT_NOT: | - |
1071 | case OP_ASSERTBACK: | - |
1072 | case OP_ASSERTBACK_NOT: | - |
1073 | if (!skipassert) return code; never evaluated: !skipassert never executed: return code; | 0 |
1074 | do code += (code[1]); while (*code == OP_ALT); never evaluated: *code == OP_ALT never executed: code += (code[1]); | 0 |
1075 | code += _pcre16_OP_lengths[*code]; | - |
1076 | break; | 0 |
1077 | | - |
1078 | case OP_WORD_BOUNDARY: | - |
1079 | case OP_NOT_WORD_BOUNDARY: | - |
1080 | if (!skipassert) return code; evaluated: !skipassert yes Evaluation Count:37 | yes Evaluation Count:3 |
executed: return code; Execution Count:37 | 3-37 |
1081 | | - |
1082 | | - |
1083 | case OP_CALLOUT: code before this statement executed: case OP_CALLOUT: Execution Count:3 | 3 |
1084 | case OP_CREF: | - |
1085 | case OP_NCREF: | - |
1086 | case OP_RREF: | - |
1087 | case OP_NRREF: | - |
1088 | case OP_DEF: | - |
1089 | code += _pcre16_OP_lengths[*code]; | - |
1090 | break; executed: break; Execution Count:7 | 7 |
1091 | | - |
1092 | default: | - |
1093 | return code; executed: return code; Execution Count:645 | 645 |
1094 | } | - |
1095 | } executed: } Execution Count:7 | 7 |
1096 | | - |
1097 | } | 0 |
1098 | static int | - |
1099 | find_fixedlength(pcre_uchar *code, BOOL utf, BOOL atend, compile_data *cd) | - |
1100 | { | - |
1101 | int length = -1; | - |
1102 | | - |
1103 | register int branchlength = 0; | - |
1104 | register pcre_uchar *cc = code + 1 + 1; | - |
1105 | | - |
1106 | | - |
1107 | | - |
1108 | | - |
1109 | for (;;) | - |
1110 | { | - |
1111 | int d; | - |
1112 | pcre_uchar *ce, *cs; | - |
1113 | register int op = *cc; | - |
1114 | | - |
1115 | switch (op) | - |
1116 | { | - |
1117 | | - |
1118 | | - |
1119 | | - |
1120 | | - |
1121 | | - |
1122 | case OP_CBRA: | - |
1123 | case OP_BRA: | - |
1124 | case OP_ONCE: | - |
1125 | case OP_ONCE_NC: | - |
1126 | case OP_COND: | - |
1127 | d = find_fixedlength(cc + ((op == OP_CBRA)? 1 : 0), utf, atend, cd); | - |
1128 | if (d < 0) return d; never executed: return d; | 0 |
1129 | branchlength += d; | - |
1130 | do cc += (cc[1]); while (*cc == OP_ALT); never evaluated: *cc == OP_ALT never executed: cc += (cc[1]); | 0 |
1131 | cc += 1 + 1; | - |
1132 | break; | 0 |
1133 | | - |
1134 | | - |
1135 | | - |
1136 | | - |
1137 | | - |
1138 | | - |
1139 | | - |
1140 | case OP_ALT: | - |
1141 | case OP_KET: | - |
1142 | case OP_END: | - |
1143 | case OP_ACCEPT: | - |
1144 | case OP_ASSERT_ACCEPT: | - |
1145 | if (length < 0) length = branchlength; never evaluated: length < 0 never executed: length = branchlength; | 0 |
1146 | else if (length != branchlength) return -1; never evaluated: length != branchlength never executed: return -1; | 0 |
1147 | if (*cc != OP_ALT) return length; never evaluated: *cc != OP_ALT never executed: return length; | 0 |
1148 | cc += 1 + 1; | - |
1149 | branchlength = 0; | - |
1150 | break; | 0 |
1151 | | - |
1152 | | - |
1153 | | - |
1154 | | - |
1155 | | - |
1156 | case OP_RECURSE: | - |
1157 | if (!atend) return -3; never executed: return -3; | 0 |
1158 | cs = ce = (pcre_uchar *)cd->start_code + (cc[1]); | - |
1159 | do ce += (ce[1]); while (*ce == OP_ALT); never evaluated: *ce == OP_ALT never executed: ce += (ce[1]); | 0 |
1160 | if (cc > cs && cc < ce) return -1; never executed: return -1; | 0 |
1161 | d = find_fixedlength(cs + 1, utf, atend, cd); | - |
1162 | if (d < 0) return d; never executed: return d; | 0 |
1163 | branchlength += d; | - |
1164 | cc += 1 + 1; | - |
1165 | break; | 0 |
1166 | | - |
1167 | | - |
1168 | | - |
1169 | case OP_ASSERT: | - |
1170 | case OP_ASSERT_NOT: | - |
1171 | case OP_ASSERTBACK: | - |
1172 | case OP_ASSERTBACK_NOT: | - |
1173 | do cc += (cc[1]); while (*cc == OP_ALT); never evaluated: *cc == OP_ALT never executed: cc += (cc[1]); | 0 |
1174 | cc += _pcre16_OP_lengths[*cc]; | - |
1175 | break; | 0 |
1176 | | - |
1177 | | - |
1178 | | - |
1179 | case OP_MARK: | - |
1180 | case OP_PRUNE_ARG: | - |
1181 | case OP_SKIP_ARG: | - |
1182 | case OP_THEN_ARG: | - |
1183 | cc += cc[1] + _pcre16_OP_lengths[*cc]; | - |
1184 | break; | 0 |
1185 | | - |
1186 | case OP_CALLOUT: | - |
1187 | case OP_CIRC: | - |
1188 | case OP_CIRCM: | - |
1189 | case OP_CLOSE: | - |
1190 | case OP_COMMIT: | - |
1191 | case OP_CREF: | - |
1192 | case OP_DEF: | - |
1193 | case OP_DOLL: | - |
1194 | case OP_DOLLM: | - |
1195 | case OP_EOD: | - |
1196 | case OP_EODN: | - |
1197 | case OP_FAIL: | - |
1198 | case OP_NCREF: | - |
1199 | case OP_NRREF: | - |
1200 | case OP_NOT_WORD_BOUNDARY: | - |
1201 | case OP_PRUNE: | - |
1202 | case OP_REVERSE: | - |
1203 | case OP_RREF: | - |
1204 | case OP_SET_SOM: | - |
1205 | case OP_SKIP: | - |
1206 | case OP_SOD: | - |
1207 | case OP_SOM: | - |
1208 | case OP_THEN: | - |
1209 | case OP_WORD_BOUNDARY: | - |
1210 | cc += _pcre16_OP_lengths[*cc]; | - |
1211 | break; | 0 |
1212 | | - |
1213 | | - |
1214 | | - |
1215 | case OP_CHAR: | - |
1216 | case OP_CHARI: | - |
1217 | case OP_NOT: | - |
1218 | case OP_NOTI: | - |
1219 | branchlength++; | - |
1220 | cc += 2; | - |
1221 | | - |
1222 | if (utf && (((cc[-1]) & 0xfc00) == 0xd800)) cc += 1; never evaluated: (((cc[-1]) & 0xfc00) == 0xd800) | 0 |
1223 | | - |
1224 | break; | 0 |
1225 | | - |
1226 | | - |
1227 | | - |
1228 | | - |
1229 | case OP_EXACT: | - |
1230 | case OP_EXACTI: | - |
1231 | case OP_NOTEXACT: | - |
1232 | case OP_NOTEXACTI: | - |
1233 | branchlength += cc[1]; | - |
1234 | cc += 2 + 1; | - |
1235 | | - |
1236 | if (utf && (((cc[-1]) & 0xfc00) == 0xd800)) cc += 1; never evaluated: (((cc[-1]) & 0xfc00) == 0xd800) | 0 |
1237 | | - |
1238 | break; | 0 |
1239 | | - |
1240 | case OP_TYPEEXACT: | - |
1241 | branchlength += cc[1]; | - |
1242 | if (cc[1 + 1] == OP_PROP || cc[1 + 1] == OP_NOTPROP) cc += 2; never evaluated: cc[1 + 1] == OP_PROP never evaluated: cc[1 + 1] == OP_NOTPROP | 0 |
1243 | cc += 1 + 1 + 1; | - |
1244 | break; | 0 |
1245 | | - |
1246 | | - |
1247 | | - |
1248 | case OP_PROP: | - |
1249 | case OP_NOTPROP: | - |
1250 | cc += 2; | - |
1251 | | - |
1252 | | - |
1253 | case OP_HSPACE: code before this statement never executed: case OP_HSPACE: | 0 |
1254 | case OP_VSPACE: | - |
1255 | case OP_NOT_HSPACE: | - |
1256 | case OP_NOT_VSPACE: | - |
1257 | case OP_NOT_DIGIT: | - |
1258 | case OP_DIGIT: | - |
1259 | case OP_NOT_WHITESPACE: | - |
1260 | case OP_WHITESPACE: | - |
1261 | case OP_NOT_WORDCHAR: | - |
1262 | case OP_WORDCHAR: | - |
1263 | case OP_ANY: | - |
1264 | case OP_ALLANY: | - |
1265 | branchlength++; | - |
1266 | cc++; | - |
1267 | break; | 0 |
1268 | | - |
1269 | | - |
1270 | | - |
1271 | | - |
1272 | case OP_ANYBYTE: | - |
1273 | return -2; never executed: return -2; | 0 |
1274 | | - |
1275 | | - |
1276 | | - |
1277 | | - |
1278 | case OP_XCLASS: | - |
1279 | cc += (cc[1]) - _pcre16_OP_lengths[OP_CLASS]; | - |
1280 | | - |
1281 | | - |
1282 | | - |
1283 | case OP_CLASS: code before this statement never executed: case OP_CLASS: | 0 |
1284 | case OP_NCLASS: | - |
1285 | cc += _pcre16_OP_lengths[OP_CLASS]; | - |
1286 | | - |
1287 | switch (*cc) | - |
1288 | { | - |
1289 | case OP_CRPLUS: | - |
1290 | case OP_CRMINPLUS: | - |
1291 | case OP_CRSTAR: | - |
1292 | case OP_CRMINSTAR: | - |
1293 | case OP_CRQUERY: | - |
1294 | case OP_CRMINQUERY: | - |
1295 | return -1; never executed: return -1; | 0 |
1296 | | - |
1297 | case OP_CRRANGE: | - |
1298 | case OP_CRMINRANGE: | - |
1299 | if (cc[1] != cc[1+1]) return -1; never evaluated: cc[1] != cc[1+1] never executed: return -1; | 0 |
1300 | branchlength += cc[1]; | - |
1301 | cc += 1 + 2 * 1; | - |
1302 | break; | 0 |
1303 | | - |
1304 | default: | - |
1305 | branchlength++; | - |
1306 | } | 0 |
1307 | break; | 0 |
1308 | | - |
1309 | | - |
1310 | | - |
1311 | case OP_ANYNL: | - |
1312 | case OP_BRAMINZERO: | - |
1313 | case OP_BRAPOS: | - |
1314 | case OP_BRAPOSZERO: | - |
1315 | case OP_BRAZERO: | - |
1316 | case OP_CBRAPOS: | - |
1317 | case OP_EXTUNI: | - |
1318 | case OP_KETRMAX: | - |
1319 | case OP_KETRMIN: | - |
1320 | case OP_KETRPOS: | - |
1321 | case OP_MINPLUS: | - |
1322 | case OP_MINPLUSI: | - |
1323 | case OP_MINQUERY: | - |
1324 | case OP_MINQUERYI: | - |
1325 | case OP_MINSTAR: | - |
1326 | case OP_MINSTARI: | - |
1327 | case OP_MINUPTO: | - |
1328 | case OP_MINUPTOI: | - |
1329 | case OP_NOTMINPLUS: | - |
1330 | case OP_NOTMINPLUSI: | - |
1331 | case OP_NOTMINQUERY: | - |
1332 | case OP_NOTMINQUERYI: | - |
1333 | case OP_NOTMINSTAR: | - |
1334 | case OP_NOTMINSTARI: | - |
1335 | case OP_NOTMINUPTO: | - |
1336 | case OP_NOTMINUPTOI: | - |
1337 | case OP_NOTPLUS: | - |
1338 | case OP_NOTPLUSI: | - |
1339 | case OP_NOTPOSPLUS: | - |
1340 | case OP_NOTPOSPLUSI: | - |
1341 | case OP_NOTPOSQUERY: | - |
1342 | case OP_NOTPOSQUERYI: | - |
1343 | case OP_NOTPOSSTAR: | - |
1344 | case OP_NOTPOSSTARI: | - |
1345 | case OP_NOTPOSUPTO: | - |
1346 | case OP_NOTPOSUPTOI: | - |
1347 | case OP_NOTQUERY: | - |
1348 | case OP_NOTQUERYI: | - |
1349 | case OP_NOTSTAR: | - |
1350 | case OP_NOTSTARI: | - |
1351 | case OP_NOTUPTO: | - |
1352 | case OP_NOTUPTOI: | - |
1353 | case OP_PLUS: | - |
1354 | case OP_PLUSI: | - |
1355 | case OP_POSPLUS: | - |
1356 | case OP_POSPLUSI: | - |
1357 | case OP_POSQUERY: | - |
1358 | case OP_POSQUERYI: | - |
1359 | case OP_POSSTAR: | - |
1360 | case OP_POSSTARI: | - |
1361 | case OP_POSUPTO: | - |
1362 | case OP_POSUPTOI: | - |
1363 | case OP_QUERY: | - |
1364 | case OP_QUERYI: | - |
1365 | case OP_REF: | - |
1366 | case OP_REFI: | - |
1367 | case OP_SBRA: | - |
1368 | case OP_SBRAPOS: | - |
1369 | case OP_SCBRA: | - |
1370 | case OP_SCBRAPOS: | - |
1371 | case OP_SCOND: | - |
1372 | case OP_SKIPZERO: | - |
1373 | case OP_STAR: | - |
1374 | case OP_STARI: | - |
1375 | case OP_TYPEMINPLUS: | - |
1376 | case OP_TYPEMINQUERY: | - |
1377 | case OP_TYPEMINSTAR: | - |
1378 | case OP_TYPEMINUPTO: | - |
1379 | case OP_TYPEPLUS: | - |
1380 | case OP_TYPEPOSPLUS: | - |
1381 | case OP_TYPEPOSQUERY: | - |
1382 | case OP_TYPEPOSSTAR: | - |
1383 | case OP_TYPEPOSUPTO: | - |
1384 | case OP_TYPEQUERY: | - |
1385 | case OP_TYPESTAR: | - |
1386 | case OP_TYPEUPTO: | - |
1387 | case OP_UPTO: | - |
1388 | case OP_UPTOI: | - |
1389 | return -1; never executed: return -1; | 0 |
1390 | | - |
1391 | | - |
1392 | | - |
1393 | | - |
1394 | default: | - |
1395 | return -4; never executed: return -4; | 0 |
1396 | } | - |
1397 | } | 0 |
1398 | | - |
1399 | } | 0 |
1400 | const pcre_uchar * | - |
1401 | _pcre16_find_bracket(const pcre_uchar *code, BOOL utf, int number) | - |
1402 | { | - |
1403 | for (;;) | - |
1404 | { | - |
1405 | register int c = *code; | - |
1406 | | - |
1407 | if (c == OP_END) return ((void *)0); evaluated: c == OP_END yes Evaluation Count:2 | yes Evaluation Count:22 |
executed: return ((void *)0); Execution Count:2 | 2-22 |
1408 | | - |
1409 | | - |
1410 | | - |
1411 | | - |
1412 | | - |
1413 | if (c == OP_XCLASS) code += (code[1]); partially evaluated: c == OP_XCLASS no Evaluation Count:0 | yes Evaluation Count:22 |
never executed: code += (code[1]); | 0-22 |
1414 | | - |
1415 | | - |
1416 | | - |
1417 | else if (c == OP_REVERSE) partially evaluated: c == OP_REVERSE no Evaluation Count:0 | yes Evaluation Count:22 |
| 0-22 |
1418 | { | - |
1419 | if (number < 0) return (pcre_uchar *)code; never evaluated: number < 0 never executed: return (pcre_uchar *)code; | 0 |
1420 | code += _pcre16_OP_lengths[c]; | - |
1421 | } | 0 |
1422 | | - |
1423 | | - |
1424 | | - |
1425 | else if (c == OP_CBRA || c == OP_SCBRA || evaluated: c == OP_CBRA yes Evaluation Count:2 | yes Evaluation Count:20 |
partially evaluated: c == OP_SCBRA no Evaluation Count:0 | yes Evaluation Count:20 |
| 0-20 |
1426 | c == OP_CBRAPOS || c == OP_SCBRAPOS) partially evaluated: c == OP_CBRAPOS no Evaluation Count:0 | yes Evaluation Count:20 |
partially evaluated: c == OP_SCBRAPOS no Evaluation Count:0 | yes Evaluation Count:20 |
| 0-20 |
1427 | { | - |
1428 | int n = code[1+1]; | - |
1429 | if (n == number) return (pcre_uchar *)code; partially evaluated: n == number yes Evaluation Count:2 | no Evaluation Count:0 |
executed: return (pcre_uchar *)code; Execution Count:2 | 0-2 |
1430 | code += _pcre16_OP_lengths[c]; | - |
1431 | } | 0 |
1432 | | - |
1433 | | - |
1434 | | - |
1435 | | - |
1436 | | - |
1437 | | - |
1438 | else | - |
1439 | { | - |
1440 | switch(c) | - |
1441 | { | - |
1442 | case OP_TYPESTAR: | - |
1443 | case OP_TYPEMINSTAR: | - |
1444 | case OP_TYPEPLUS: | - |
1445 | case OP_TYPEMINPLUS: | - |
1446 | case OP_TYPEQUERY: | - |
1447 | case OP_TYPEMINQUERY: | - |
1448 | case OP_TYPEPOSSTAR: | - |
1449 | case OP_TYPEPOSPLUS: | - |
1450 | case OP_TYPEPOSQUERY: | - |
1451 | if (code[1] == OP_PROP || code[1] == OP_NOTPROP) code += 2; never evaluated: code[1] == OP_PROP never evaluated: code[1] == OP_NOTPROP never executed: code += 2; | 0 |
1452 | break; | 0 |
1453 | | - |
1454 | case OP_TYPEUPTO: | - |
1455 | case OP_TYPEMINUPTO: | - |
1456 | case OP_TYPEEXACT: | - |
1457 | case OP_TYPEPOSUPTO: | - |
1458 | if (code[1 + 1] == OP_PROP never evaluated: code[1 + 1] == OP_PROP | 0 |
1459 | || code[1 + 1] == OP_NOTPROP) code += 2; never evaluated: code[1 + 1] == OP_NOTPROP never executed: code += 2; | 0 |
1460 | break; | 0 |
1461 | | - |
1462 | case OP_MARK: | - |
1463 | case OP_PRUNE_ARG: | - |
1464 | case OP_SKIP_ARG: | - |
1465 | code += code[1]; | - |
1466 | break; | 0 |
1467 | | - |
1468 | case OP_THEN_ARG: | - |
1469 | code += code[1]; | - |
1470 | break; | 0 |
1471 | } | - |
1472 | | - |
1473 | | - |
1474 | | - |
1475 | code += _pcre16_OP_lengths[c]; | - |
1476 | | - |
1477 | | - |
1478 | | - |
1479 | | - |
1480 | | - |
1481 | | - |
1482 | if (utf) switch(c) partially evaluated: utf yes Evaluation Count:20 | no Evaluation Count:0 |
| 0-20 |
1483 | { | - |
1484 | case OP_CHAR: | - |
1485 | case OP_CHARI: | - |
1486 | case OP_EXACT: | - |
1487 | case OP_EXACTI: | - |
1488 | case OP_UPTO: | - |
1489 | case OP_UPTOI: | - |
1490 | case OP_MINUPTO: | - |
1491 | case OP_MINUPTOI: | - |
1492 | case OP_POSUPTO: | - |
1493 | case OP_POSUPTOI: | - |
1494 | case OP_STAR: | - |
1495 | case OP_STARI: | - |
1496 | case OP_MINSTAR: | - |
1497 | case OP_MINSTARI: | - |
1498 | case OP_POSSTAR: | - |
1499 | case OP_POSSTARI: | - |
1500 | case OP_PLUS: | - |
1501 | case OP_PLUSI: | - |
1502 | case OP_MINPLUS: | - |
1503 | case OP_MINPLUSI: | - |
1504 | case OP_POSPLUS: | - |
1505 | case OP_POSPLUSI: | - |
1506 | case OP_QUERY: | - |
1507 | case OP_QUERYI: | - |
1508 | case OP_MINQUERY: | - |
1509 | case OP_MINQUERYI: | - |
1510 | case OP_POSQUERY: | - |
1511 | case OP_POSQUERYI: | - |
1512 | if ((((code[-1]) & 0xfc00) == 0xd800)) code += 1; partially evaluated: (((code[-1]) & 0xfc00) == 0xd800) no Evaluation Count:0 | yes Evaluation Count:4 |
never executed: code += 1; | 0-4 |
1513 | break; executed: break; Execution Count:4 | 4 |
1514 | } | 0 |
1515 | | - |
1516 | | - |
1517 | | - |
1518 | } executed: } Execution Count:20 | 20 |
1519 | } | - |
1520 | } | 0 |
1521 | static const pcre_uchar * | - |
1522 | find_recurse(const pcre_uchar *code, BOOL utf) | - |
1523 | { | - |
1524 | for (;;) | - |
1525 | { | - |
1526 | register int c = *code; | - |
1527 | if (c == OP_END) return ((void *)0); evaluated: c == OP_END yes Evaluation Count:106 | yes Evaluation Count:513 |
executed: return ((void *)0); Execution Count:106 | 106-513 |
1528 | if (c == OP_RECURSE) return code; partially evaluated: c == OP_RECURSE no Evaluation Count:0 | yes Evaluation Count:513 |
never executed: return code; | 0-513 |
1529 | | - |
1530 | | - |
1531 | | - |
1532 | | - |
1533 | | - |
1534 | if (c == OP_XCLASS) code += (code[1]); partially evaluated: c == OP_XCLASS no Evaluation Count:0 | yes Evaluation Count:513 |
never executed: code += (code[1]); | 0-513 |
1535 | | - |
1536 | | - |
1537 | | - |
1538 | | - |
1539 | | - |
1540 | | - |
1541 | else | - |
1542 | { | - |
1543 | switch(c) | - |
1544 | { | - |
1545 | case OP_TYPESTAR: | - |
1546 | case OP_TYPEMINSTAR: | - |
1547 | case OP_TYPEPLUS: | - |
1548 | case OP_TYPEMINPLUS: | - |
1549 | case OP_TYPEQUERY: | - |
1550 | case OP_TYPEMINQUERY: | - |
1551 | case OP_TYPEPOSSTAR: | - |
1552 | case OP_TYPEPOSPLUS: | - |
1553 | case OP_TYPEPOSQUERY: | - |
1554 | if (code[1] == OP_PROP || code[1] == OP_NOTPROP) code += 2; partially evaluated: code[1] == OP_PROP no Evaluation Count:0 | yes Evaluation Count:1 |
partially evaluated: code[1] == OP_NOTPROP no Evaluation Count:0 | yes Evaluation Count:1 |
never executed: code += 2; | 0-1 |
1555 | break; executed: break; Execution Count:1 | 1 |
1556 | | - |
1557 | case OP_TYPEPOSUPTO: | - |
1558 | case OP_TYPEUPTO: | - |
1559 | case OP_TYPEMINUPTO: | - |
1560 | case OP_TYPEEXACT: | - |
1561 | if (code[1 + 1] == OP_PROP never evaluated: code[1 + 1] == OP_PROP | 0 |
1562 | || code[1 + 1] == OP_NOTPROP) code += 2; never evaluated: code[1 + 1] == OP_NOTPROP never executed: code += 2; | 0 |
1563 | break; | 0 |
1564 | | - |
1565 | case OP_MARK: | - |
1566 | case OP_PRUNE_ARG: | - |
1567 | case OP_SKIP_ARG: | - |
1568 | code += code[1]; | - |
1569 | break; | 0 |
1570 | | - |
1571 | case OP_THEN_ARG: | - |
1572 | code += code[1]; | - |
1573 | break; | 0 |
1574 | } | - |
1575 | | - |
1576 | | - |
1577 | | - |
1578 | code += _pcre16_OP_lengths[c]; | - |
1579 | | - |
1580 | | - |
1581 | | - |
1582 | | - |
1583 | | - |
1584 | | - |
1585 | if (utf) switch(c) partially evaluated: utf yes Evaluation Count:513 | no Evaluation Count:0 |
| 0-513 |
1586 | { | - |
1587 | case OP_CHAR: | - |
1588 | case OP_CHARI: | - |
1589 | case OP_EXACT: | - |
1590 | case OP_EXACTI: | - |
1591 | case OP_UPTO: | - |
1592 | case OP_UPTOI: | - |
1593 | case OP_MINUPTO: | - |
1594 | case OP_MINUPTOI: | - |
1595 | case OP_POSUPTO: | - |
1596 | case OP_POSUPTOI: | - |
1597 | case OP_STAR: | - |
1598 | case OP_STARI: | - |
1599 | case OP_MINSTAR: | - |
1600 | case OP_MINSTARI: | - |
1601 | case OP_POSSTAR: | - |
1602 | case OP_POSSTARI: | - |
1603 | case OP_PLUS: | - |
1604 | case OP_PLUSI: | - |
1605 | case OP_MINPLUS: | - |
1606 | case OP_MINPLUSI: | - |
1607 | case OP_POSPLUS: | - |
1608 | case OP_POSPLUSI: | - |
1609 | case OP_QUERY: | - |
1610 | case OP_QUERYI: | - |
1611 | case OP_MINQUERY: | - |
1612 | case OP_MINQUERYI: | - |
1613 | case OP_POSQUERY: | - |
1614 | case OP_POSQUERYI: | - |
1615 | if ((((code[-1]) & 0xfc00) == 0xd800)) code += 1; partially evaluated: (((code[-1]) & 0xfc00) == 0xd800) no Evaluation Count:0 | yes Evaluation Count:294 |
never executed: code += 1; | 0-294 |
1616 | break; executed: break; Execution Count:294 | 294 |
1617 | } | 0 |
1618 | | - |
1619 | | - |
1620 | | - |
1621 | } executed: } Execution Count:513 | 513 |
1622 | } | - |
1623 | } | 0 |
1624 | static BOOL | - |
1625 | could_be_empty_branch(const pcre_uchar *code, const pcre_uchar *endcode, | - |
1626 | BOOL utf, compile_data *cd) | - |
1627 | { | - |
1628 | register int c; | - |
1629 | for (code = first_significant_code(code + _pcre16_OP_lengths[*code], 1); | - |
1630 | code < endcode; partially evaluated: code < endcode yes Evaluation Count:3 | no Evaluation Count:0 |
| 0-3 |
1631 | code = first_significant_code(code + _pcre16_OP_lengths[c], 1)) | - |
1632 | { | - |
1633 | const pcre_uchar *ccode; | - |
1634 | | - |
1635 | c = *code; | - |
1636 | | - |
1637 | | - |
1638 | | - |
1639 | | - |
1640 | if (c == OP_ASSERT) partially evaluated: c == OP_ASSERT no Evaluation Count:0 | yes Evaluation Count:3 |
| 0-3 |
1641 | { | - |
1642 | do code += (code[1]); while (*code == OP_ALT); never evaluated: *code == OP_ALT never executed: code += (code[1]); | 0 |
1643 | c = *code; | - |
1644 | continue; never executed: continue; | 0 |
1645 | } | - |
1646 | if (c == OP_RECURSE) partially evaluated: c == OP_RECURSE no Evaluation Count:0 | yes Evaluation Count:3 |
| 0-3 |
1647 | { | - |
1648 | const pcre_uchar *scode; | - |
1649 | BOOL empty_branch; | - |
1650 | | - |
1651 | | - |
1652 | | - |
1653 | for (scode = cd->start_workspace; scode < cd->hwm; scode += 1) never evaluated: scode < cd->hwm | 0 |
1654 | if ((scode[0]) == code + 1 - cd->start_code) return 1; never evaluated: (scode[0]) == code + 1 - cd->start_code never executed: return 1; | 0 |
1655 | | - |
1656 | | - |
1657 | | - |
1658 | empty_branch = 0; | - |
1659 | scode = cd->start_code + (code[1]); | - |
1660 | if ((scode[1]) == 0) return 1; never evaluated: (scode[1]) == 0 never executed: return 1; | 0 |
1661 | | - |
1662 | | - |
1663 | | - |
1664 | do | - |
1665 | { | - |
1666 | if (could_be_empty_branch(scode, endcode, utf, cd)) never evaluated: could_be_empty_branch(scode, endcode, utf, cd) | 0 |
1667 | { | - |
1668 | empty_branch = 1; | - |
1669 | break; | 0 |
1670 | } | - |
1671 | scode += (scode[1]); | - |
1672 | } | 0 |
1673 | while (*scode == OP_ALT); never evaluated: *scode == OP_ALT | 0 |
1674 | | - |
1675 | if (!empty_branch) return 0; never evaluated: !empty_branch never executed: return 0; | 0 |
1676 | continue; never executed: continue; | 0 |
1677 | } | - |
1678 | | - |
1679 | | - |
1680 | | - |
1681 | if (c == OP_BRAZERO || c == OP_BRAMINZERO || c == OP_SKIPZERO || partially evaluated: c == OP_BRAZERO no Evaluation Count:0 | yes Evaluation Count:3 |
partially evaluated: c == OP_BRAMINZERO no Evaluation Count:0 | yes Evaluation Count:3 |
partially evaluated: c == OP_SKIPZERO no Evaluation Count:0 | yes Evaluation Count:3 |
| 0-3 |
1682 | c == OP_BRAPOSZERO) partially evaluated: c == OP_BRAPOSZERO no Evaluation Count:0 | yes Evaluation Count:3 |
| 0-3 |
1683 | { | - |
1684 | code += _pcre16_OP_lengths[c]; | - |
1685 | do code += (code[1]); while (*code == OP_ALT); never evaluated: *code == OP_ALT never executed: code += (code[1]); | 0 |
1686 | c = *code; | - |
1687 | continue; never executed: continue; | 0 |
1688 | } | - |
1689 | | - |
1690 | | - |
1691 | | - |
1692 | | - |
1693 | if (c == OP_SBRA || c == OP_SBRAPOS || partially evaluated: c == OP_SBRA no Evaluation Count:0 | yes Evaluation Count:3 |
partially evaluated: c == OP_SBRAPOS no Evaluation Count:0 | yes Evaluation Count:3 |
| 0-3 |
1694 | c == OP_SCBRA || c == OP_SCBRAPOS) partially evaluated: c == OP_SCBRA no Evaluation Count:0 | yes Evaluation Count:3 |
partially evaluated: c == OP_SCBRAPOS no Evaluation Count:0 | yes Evaluation Count:3 |
| 0-3 |
1695 | { | - |
1696 | do code += (code[1]); while (*code == OP_ALT); never evaluated: *code == OP_ALT never executed: code += (code[1]); | 0 |
1697 | c = *code; | - |
1698 | continue; never executed: continue; | 0 |
1699 | } | - |
1700 | | - |
1701 | | - |
1702 | | - |
1703 | if (c == OP_BRA || c == OP_BRAPOS || partially evaluated: c == OP_BRA no Evaluation Count:0 | yes Evaluation Count:3 |
partially evaluated: c == OP_BRAPOS no Evaluation Count:0 | yes Evaluation Count:3 |
| 0-3 |
1704 | c == OP_CBRA || c == OP_CBRAPOS || partially evaluated: c == OP_CBRA no Evaluation Count:0 | yes Evaluation Count:3 |
partially evaluated: c == OP_CBRAPOS no Evaluation Count:0 | yes Evaluation Count:3 |
| 0-3 |
1705 | c == OP_ONCE || c == OP_ONCE_NC || partially evaluated: c == OP_ONCE no Evaluation Count:0 | yes Evaluation Count:3 |
partially evaluated: c == OP_ONCE_NC no Evaluation Count:0 | yes Evaluation Count:3 |
| 0-3 |
1706 | c == OP_COND) partially evaluated: c == OP_COND no Evaluation Count:0 | yes Evaluation Count:3 |
| 0-3 |
1707 | { | - |
1708 | BOOL empty_branch; | - |
1709 | if ((code[1]) == 0) return 1; never evaluated: (code[1]) == 0 never executed: return 1; | 0 |
1710 | | - |
1711 | | - |
1712 | | - |
1713 | | - |
1714 | | - |
1715 | if (c == OP_COND && code[(code[1])] != OP_ALT) never evaluated: c == OP_COND never evaluated: code[(code[1])] != OP_ALT | 0 |
1716 | code += (code[1]); never executed: code += (code[1]); | 0 |
1717 | else | - |
1718 | { | - |
1719 | empty_branch = 0; | - |
1720 | do | - |
1721 | { | - |
1722 | if (!empty_branch && could_be_empty_branch(code, endcode, utf, cd)) never evaluated: !empty_branch never evaluated: could_be_empty_branch(code, endcode, utf, cd) | 0 |
1723 | empty_branch = 1; never executed: empty_branch = 1; | 0 |
1724 | code += (code[1]); | - |
1725 | } | 0 |
1726 | while (*code == OP_ALT); never evaluated: *code == OP_ALT | 0 |
1727 | if (!empty_branch) return 0; never evaluated: !empty_branch never executed: return 0; | 0 |
1728 | } | 0 |
1729 | | - |
1730 | c = *code; | - |
1731 | continue; never executed: continue; | 0 |
1732 | } | - |
1733 | | - |
1734 | | - |
1735 | | - |
1736 | switch (c) | - |
1737 | { | - |
1738 | | - |
1739 | | - |
1740 | | - |
1741 | | - |
1742 | | - |
1743 | | - |
1744 | | - |
1745 | case OP_XCLASS: | - |
1746 | ccode = code += (code[1]); | - |
1747 | goto CHECK_CLASS_REPEAT; never executed: goto CHECK_CLASS_REPEAT; | 0 |
1748 | | - |
1749 | | - |
1750 | case OP_CLASS: | - |
1751 | case OP_NCLASS: | - |
1752 | ccode = code + _pcre16_OP_lengths[OP_CLASS]; | - |
1753 | | - |
1754 | | - |
1755 | CHECK_CLASS_REPEAT: code before this statement never executed: CHECK_CLASS_REPEAT: | 0 |
1756 | | - |
1757 | | - |
1758 | switch (*ccode) | - |
1759 | { | - |
1760 | case OP_CRSTAR: | - |
1761 | case OP_CRMINSTAR: | - |
1762 | case OP_CRQUERY: | - |
1763 | case OP_CRMINQUERY: | - |
1764 | break; | 0 |
1765 | | - |
1766 | default: | - |
1767 | case OP_CRPLUS: | - |
1768 | case OP_CRMINPLUS: | - |
1769 | return 0; never executed: return 0; | 0 |
1770 | | - |
1771 | case OP_CRRANGE: | - |
1772 | case OP_CRMINRANGE: | - |
1773 | if (ccode[1] > 0) return 0; never evaluated: ccode[1] > 0 never executed: return 0; | 0 |
1774 | break; | 0 |
1775 | } | - |
1776 | break; | 0 |
1777 | | - |
1778 | | - |
1779 | | - |
1780 | case OP_PROP: | - |
1781 | case OP_NOTPROP: | - |
1782 | case OP_EXTUNI: | - |
1783 | case OP_NOT_DIGIT: | - |
1784 | case OP_DIGIT: | - |
1785 | case OP_NOT_WHITESPACE: | - |
1786 | case OP_WHITESPACE: | - |
1787 | case OP_NOT_WORDCHAR: | - |
1788 | case OP_WORDCHAR: | - |
1789 | case OP_ANY: | - |
1790 | case OP_ALLANY: | - |
1791 | case OP_ANYBYTE: | - |
1792 | case OP_CHAR: | - |
1793 | case OP_CHARI: | - |
1794 | case OP_NOT: | - |
1795 | case OP_NOTI: | - |
1796 | case OP_PLUS: | - |
1797 | case OP_MINPLUS: | - |
1798 | case OP_POSPLUS: | - |
1799 | case OP_EXACT: | - |
1800 | case OP_NOTPLUS: | - |
1801 | case OP_NOTMINPLUS: | - |
1802 | case OP_NOTPOSPLUS: | - |
1803 | case OP_NOTEXACT: | - |
1804 | case OP_TYPEPLUS: | - |
1805 | case OP_TYPEMINPLUS: | - |
1806 | case OP_TYPEPOSPLUS: | - |
1807 | case OP_TYPEEXACT: | - |
1808 | return 0; executed: return 0; Execution Count:3 | 3 |
1809 | | - |
1810 | | - |
1811 | | - |
1812 | | - |
1813 | case OP_TYPESTAR: | - |
1814 | case OP_TYPEMINSTAR: | - |
1815 | case OP_TYPEPOSSTAR: | - |
1816 | case OP_TYPEQUERY: | - |
1817 | case OP_TYPEMINQUERY: | - |
1818 | case OP_TYPEPOSQUERY: | - |
1819 | if (code[1] == OP_PROP || code[1] == OP_NOTPROP) code += 2; never evaluated: code[1] == OP_PROP never evaluated: code[1] == OP_NOTPROP never executed: code += 2; | 0 |
1820 | break; | 0 |
1821 | | - |
1822 | | - |
1823 | | - |
1824 | case OP_TYPEUPTO: | - |
1825 | case OP_TYPEMINUPTO: | - |
1826 | case OP_TYPEPOSUPTO: | - |
1827 | if (code[1 + 1] == OP_PROP never evaluated: code[1 + 1] == OP_PROP | 0 |
1828 | || code[1 + 1] == OP_NOTPROP) code += 2; never evaluated: code[1 + 1] == OP_NOTPROP never executed: code += 2; | 0 |
1829 | break; | 0 |
1830 | | - |
1831 | | - |
1832 | | - |
1833 | case OP_KET: | - |
1834 | case OP_KETRMAX: | - |
1835 | case OP_KETRMIN: | - |
1836 | case OP_KETRPOS: | - |
1837 | case OP_ALT: | - |
1838 | return 1; never executed: return 1; | 0 |
1839 | | - |
1840 | | - |
1841 | | - |
1842 | | - |
1843 | | - |
1844 | case OP_STAR: | - |
1845 | case OP_STARI: | - |
1846 | case OP_MINSTAR: | - |
1847 | case OP_MINSTARI: | - |
1848 | case OP_POSSTAR: | - |
1849 | case OP_POSSTARI: | - |
1850 | case OP_QUERY: | - |
1851 | case OP_QUERYI: | - |
1852 | case OP_MINQUERY: | - |
1853 | case OP_MINQUERYI: | - |
1854 | case OP_POSQUERY: | - |
1855 | case OP_POSQUERYI: | - |
1856 | if (utf && (((code[1]) & 0xfc00) == 0xd800)) code += 1; never evaluated: (((code[1]) & 0xfc00) == 0xd800) never executed: code += 1; | 0 |
1857 | break; | 0 |
1858 | | - |
1859 | case OP_UPTO: | - |
1860 | case OP_UPTOI: | - |
1861 | case OP_MINUPTO: | - |
1862 | case OP_MINUPTOI: | - |
1863 | case OP_POSUPTO: | - |
1864 | case OP_POSUPTOI: | - |
1865 | if (utf && (((code[1 + 1]) & 0xfc00) == 0xd800)) code += 1; never evaluated: (((code[1 + 1]) & 0xfc00) == 0xd800) never executed: code += 1; | 0 |
1866 | break; | 0 |
1867 | | - |
1868 | | - |
1869 | | - |
1870 | | - |
1871 | | - |
1872 | case OP_MARK: | - |
1873 | case OP_PRUNE_ARG: | - |
1874 | case OP_SKIP_ARG: | - |
1875 | code += code[1]; | - |
1876 | break; | 0 |
1877 | | - |
1878 | case OP_THEN_ARG: | - |
1879 | code += code[1]; | - |
1880 | break; | 0 |
1881 | | - |
1882 | | - |
1883 | | - |
1884 | default: | - |
1885 | break; | 0 |
1886 | } | - |
1887 | } | 0 |
1888 | | - |
1889 | return 1; never executed: return 1; | 0 |
1890 | } | - |
1891 | static BOOL | - |
1892 | could_be_empty(const pcre_uchar *code, const pcre_uchar *endcode, | - |
1893 | branch_chain *bcptr, BOOL utf, compile_data *cd) | - |
1894 | { | - |
1895 | while (bcptr != ((void *)0) && bcptr->current_branch >= code) never evaluated: bcptr != ((void *)0) never evaluated: bcptr->current_branch >= code | 0 |
1896 | { | - |
1897 | if (!could_be_empty_branch(bcptr->current_branch, endcode, utf, cd)) never evaluated: !could_be_empty_branch(bcptr->current_branch, endcode, utf, cd) | 0 |
1898 | return 0; never executed: return 0; | 0 |
1899 | bcptr = bcptr->outer; | - |
1900 | } | 0 |
1901 | return 1; never executed: return 1; | 0 |
1902 | } | - |
1903 | static BOOL | - |
1904 | check_posix_syntax(const pcre_uchar *ptr, const pcre_uchar **endptr) | - |
1905 | { | - |
1906 | int terminator; | - |
1907 | terminator = *(++ptr); | - |
1908 | for (++ptr; *ptr != 0; ptr++) never evaluated: *ptr != 0 | 0 |
1909 | { | - |
1910 | if (*ptr == '\134' && ptr[1] == '\135') never evaluated: *ptr == '\134' never evaluated: ptr[1] == '\135' | 0 |
1911 | ptr++; | 0 |
1912 | else if (*ptr == '\135') return 0; never evaluated: *ptr == '\135' never executed: return 0; | 0 |
1913 | else | - |
1914 | { | - |
1915 | if (*ptr == terminator && ptr[1] == '\135') never evaluated: *ptr == terminator never evaluated: ptr[1] == '\135' | 0 |
1916 | { | - |
1917 | *endptr = ptr; | - |
1918 | return 1; never executed: return 1; | 0 |
1919 | } | - |
1920 | if (*ptr == '\133' && never evaluated: *ptr == '\133' | 0 |
1921 | (ptr[1] == '\072' || ptr[1] == '\056' || never evaluated: ptr[1] == '\072' never evaluated: ptr[1] == '\056' | 0 |
1922 | ptr[1] == '\075') && never evaluated: ptr[1] == '\075' | 0 |
1923 | check_posix_syntax(ptr, endptr)) never evaluated: check_posix_syntax(ptr, endptr) | 0 |
1924 | return 0; never executed: return 0; | 0 |
1925 | } | 0 |
1926 | } | - |
1927 | return 0; never executed: return 0; | 0 |
1928 | } | - |
1929 | static int | - |
1930 | check_posix_name(const pcre_uchar *ptr, int len) | - |
1931 | { | - |
1932 | const char *pn = posix_names; | - |
1933 | register int yield = 0; | - |
1934 | while (posix_name_lengths[yield] != 0) never evaluated: posix_name_lengths[yield] != 0 | 0 |
1935 | { | - |
1936 | if (len == posix_name_lengths[yield] && never evaluated: len == posix_name_lengths[yield] | 0 |
1937 | _pcre16_strncmp_uc_c8((ptr), (pn), (len)) == 0) return yield; never evaluated: _pcre16_strncmp_uc_c8((ptr), (pn), (len)) == 0 never executed: return yield; | 0 |
1938 | pn += posix_name_lengths[yield] + 1; | - |
1939 | yield++; | - |
1940 | } | 0 |
1941 | return -1; never executed: return -1; | 0 |
1942 | } | - |
1943 | static void | - |
1944 | adjust_recurse(pcre_uchar *group, int adjust, BOOL utf, compile_data *cd, | - |
1945 | pcre_uchar *save_hwm) | - |
1946 | { | - |
1947 | pcre_uchar *ptr = group; | - |
1948 | | - |
1949 | while ((ptr = (pcre_uchar *)find_recurse(ptr, utf)) != ((void *)0)) partially evaluated: (ptr = (pcre_uchar *)find_recurse(ptr, utf)) != ((void *)0) no Evaluation Count:0 | yes Evaluation Count:106 |
| 0-106 |
1950 | { | - |
1951 | int offset; | - |
1952 | pcre_uchar *hc; | - |
1953 | | - |
1954 | | - |
1955 | | - |
1956 | | - |
1957 | for (hc = save_hwm; hc < cd->hwm; hc += 1) never evaluated: hc < cd->hwm | 0 |
1958 | { | - |
1959 | offset = (hc[0]); | - |
1960 | if (cd->start_code + offset == ptr + 1) never evaluated: cd->start_code + offset == ptr + 1 | 0 |
1961 | { | - |
1962 | (hc[0] = (offset + adjust)); | - |
1963 | break; | 0 |
1964 | } | - |
1965 | } | 0 |
1966 | | - |
1967 | | - |
1968 | | - |
1969 | | - |
1970 | if (hc >= cd->hwm) never evaluated: hc >= cd->hwm | 0 |
1971 | { | - |
1972 | offset = (ptr[1]); | - |
1973 | if (cd->start_code + offset >= group) (ptr[1] = (offset + adjust)); never evaluated: cd->start_code + offset >= group never executed: (ptr[1] = (offset + adjust)); | 0 |
1974 | } | 0 |
1975 | | - |
1976 | ptr += 1 + 1; | - |
1977 | } | 0 |
1978 | } executed: } Execution Count:106 | 106 |
1979 | static pcre_uchar * | - |
1980 | auto_callout(pcre_uchar *code, const pcre_uchar *ptr, compile_data *cd) | - |
1981 | { | - |
1982 | *code++ = OP_CALLOUT; | - |
1983 | *code++ = 255; | - |
1984 | (code[0] = ((int)(ptr - cd->start_pattern))); | - |
1985 | (code[1] = (0)); | - |
1986 | return code + 2 * 1; never executed: return code + 2 * 1; | 0 |
1987 | } | - |
1988 | static void | - |
1989 | complete_callout(pcre_uchar *previous_callout, const pcre_uchar *ptr, compile_data *cd) | - |
1990 | { | - |
1991 | int length = (int)(ptr - cd->start_pattern - (previous_callout[2])); | - |
1992 | (previous_callout[2 + 1] = (length)); | - |
1993 | } | 0 |
1994 | static BOOL | - |
1995 | get_othercase_range(unsigned int *cptr, unsigned int d, unsigned int *ocptr, | - |
1996 | unsigned int *odptr) | - |
1997 | { | - |
1998 | unsigned int c, othercase, next; | - |
1999 | | - |
2000 | for (c = *cptr; c <= d; c++) | 0 |
2001 | { if ((othercase = (c + (_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(c) / 128] * 128 + (c) % 128])->other_case)) != c) break; } never evaluated: (othercase = (c + (_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(c) / 128] * 128 + (c) % 128])->other_case)) != c | 0 |
2002 | | - |
2003 | if (c > d) return 0; never executed: return 0; | 0 |
2004 | | - |
2005 | *ocptr = othercase; | - |
2006 | next = othercase + 1; | - |
2007 | | - |
2008 | for (++c; c <= d; c++) | 0 |
2009 | { | - |
2010 | if ((c + (_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(c) / 128] * 128 + (c) % 128])->other_case) != next) break; never evaluated: (c + (_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(c) / 128] * 128 + (c) % 128])->other_case) != next | 0 |
2011 | next++; | - |
2012 | } | 0 |
2013 | | - |
2014 | *odptr = next - 1; | - |
2015 | *cptr = c; | - |
2016 | | - |
2017 | return 1; never executed: return 1; | 0 |
2018 | } | - |
2019 | static BOOL | - |
2020 | check_char_prop(int c, int ptype, int pdata, BOOL negated) | - |
2021 | { | - |
2022 | const ucd_record *prop = (_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(c) / 128] * 128 + (c) % 128]); | - |
2023 | switch(ptype) | - |
2024 | { | - |
2025 | case 1: | - |
2026 | return (prop->chartype == ucp_Lu || | 0 |
2027 | prop->chartype == ucp_Ll || | 0 |
2028 | prop->chartype == ucp_Lt) == negated; never executed: return (prop->chartype == ucp_Lu || prop->chartype == ucp_Ll || prop->chartype == ucp_Lt) == negated; | 0 |
2029 | | - |
2030 | case 2: | - |
2031 | return (pdata == _pcre16_ucp_gentype[prop->chartype]) == negated; never executed: return (pdata == _pcre16_ucp_gentype[prop->chartype]) == negated; | 0 |
2032 | | - |
2033 | case 3: | - |
2034 | return (pdata == prop->chartype) == negated; never executed: return (pdata == prop->chartype) == negated; | 0 |
2035 | | - |
2036 | case 4: | - |
2037 | return (pdata == prop->script) == negated; never executed: return (pdata == prop->script) == negated; | 0 |
2038 | | - |
2039 | | - |
2040 | | - |
2041 | case 5: | - |
2042 | return (_pcre16_ucp_gentype[prop->chartype] == ucp_L || | 0 |
2043 | _pcre16_ucp_gentype[prop->chartype] == ucp_N) == negated; never executed: return (_pcre16_ucp_gentype[prop->chartype] == ucp_L || _pcre16_ucp_gentype[prop->chartype] == ucp_N) == negated; | 0 |
2044 | | - |
2045 | case 6: | - |
2046 | return (_pcre16_ucp_gentype[prop->chartype] == ucp_Z || | 0 |
2047 | c == '\011' || c == '\012' || c == '\014' || c == '\015') | 0 |
2048 | == negated; never executed: return (_pcre16_ucp_gentype[prop->chartype] == ucp_Z || c == '\011' || c == '\012' || c == '\014' || c == '\015') == negated; | 0 |
2049 | | - |
2050 | case 7: | - |
2051 | return (_pcre16_ucp_gentype[prop->chartype] == ucp_Z || | 0 |
2052 | c == '\011' || c == '\012' || c == '\013' || | 0 |
2053 | c == '\014' || c == '\015') | 0 |
2054 | == negated; never executed: return (_pcre16_ucp_gentype[prop->chartype] == ucp_Z || c == '\011' || c == '\012' || c == '\013' || c == '\014' || c == '\015') == negated; | 0 |
2055 | | - |
2056 | case 8: | - |
2057 | return (_pcre16_ucp_gentype[prop->chartype] == ucp_L || | 0 |
2058 | _pcre16_ucp_gentype[prop->chartype] == ucp_N || | 0 |
2059 | c == '\137') == negated; never executed: return (_pcre16_ucp_gentype[prop->chartype] == ucp_L || _pcre16_ucp_gentype[prop->chartype] == ucp_N || c == '\137') == negated; | 0 |
2060 | } | - |
2061 | return 0; never executed: return 0; | 0 |
2062 | } | - |
2063 | static BOOL | - |
2064 | check_auto_possessive(const pcre_uchar *previous, BOOL utf, | - |
2065 | const pcre_uchar *ptr, int options, compile_data *cd) | - |
2066 | { | - |
2067 | pcre_int32 c, next; | - |
2068 | int op_code = *previous++; | - |
2069 | | - |
2070 | | - |
2071 | | - |
2072 | if ((options & 0x00000008) != 0) evaluated: (options & 0x00000008) != 0 yes Evaluation Count:4 | yes Evaluation Count:353 |
| 4-353 |
2073 | { | - |
2074 | for (;;) | - |
2075 | { | - |
2076 | while (((*ptr) <= 255u) && (cd->ctypes[*ptr] & 0x01) != 0) ptr++; partially evaluated: ((*ptr) <= 255u) yes Evaluation Count:14 | no Evaluation Count:0 |
evaluated: (cd->ctypes[*ptr] & 0x01) != 0 yes Evaluation Count:6 | yes Evaluation Count:8 |
executed: ptr++; Execution Count:6 | 0-14 |
2077 | if (*ptr == '\043') evaluated: *ptr == '\043' yes Evaluation Count:4 | yes Evaluation Count:4 |
| 4 |
2078 | { | - |
2079 | ptr++; | - |
2080 | while (*ptr != 0) evaluated: *ptr != 0 yes Evaluation Count:42 | yes Evaluation Count:2 |
| 2-42 |
2081 | { | - |
2082 | if (((cd->nltype != 0)? ((ptr) < cd->end_pattern && _pcre16_is_newline((ptr), cd->nltype, cd->end_pattern, &(cd->nllen), utf)) : ((ptr) <= cd->end_pattern - cd->nllen && (ptr)[0] == cd->nl[0] && (cd->nllen == 1 || (ptr)[1] == cd->nl[1]) ) )) { ptr += cd->nllen; break; } partially evaluated: (cd->nltype != 0) no Evaluation Count:0 | yes Evaluation Count:42 |
executed: break; Execution Count:2 | 0-42 |
2083 | ptr++; | - |
2084 | | - |
2085 | if (utf) if ((*ptr & 0xfc00) == 0xdc00) ptr++; partially evaluated: utf yes Evaluation Count:40 | no Evaluation Count:0 |
partially evaluated: (*ptr & 0xfc00) == 0xdc00 no Evaluation Count:0 | yes Evaluation Count:40 |
| 0-40 |
2086 | | - |
2087 | } executed: } Execution Count:40 | 40 |
2088 | } executed: } Execution Count:4 | 4 |
2089 | else break; executed: break; Execution Count:4 | 4 |
2090 | } | - |
2091 | } executed: } Execution Count:4 | 4 |
2092 | | - |
2093 | | - |
2094 | | - |
2095 | | - |
2096 | if (*ptr == '\134') evaluated: *ptr == '\134' yes Evaluation Count:110 | yes Evaluation Count:247 |
| 110-247 |
2097 | { | - |
2098 | int temperrorcode = 0; | - |
2099 | next = check_escape(&ptr, &temperrorcode, cd->bracount, options, 0); | - |
2100 | if (temperrorcode != 0) return 0; partially evaluated: temperrorcode != 0 no Evaluation Count:0 | yes Evaluation Count:110 |
never executed: return 0; | 0-110 |
2101 | ptr++; | - |
2102 | } executed: } Execution Count:110 | 110 |
2103 | else if (!((*ptr) <= 255u) || (cd->ctypes[*ptr] & 0x80) == 0) partially evaluated: !((*ptr) <= 255u) no Evaluation Count:0 | yes Evaluation Count:247 |
evaluated: (cd->ctypes[*ptr] & 0x80) == 0 yes Evaluation Count:66 | yes Evaluation Count:181 |
| 0-247 |
2104 | { | - |
2105 | | - |
2106 | if (utf) { next = *ptr++; if ((next & 0xfc00) == 0xd800) { next = (((next & 0x3ff) << 10) | (*ptr++ & 0x3ff)) + 0x10000; };; } else partially evaluated: (next & 0xfc00) == 0xd800 no Evaluation Count:0 | yes Evaluation Count:66 |
partially evaluated: utf yes Evaluation Count:66 | no Evaluation Count:0 |
executed: } Execution Count:66 | 0-66 |
2107 | | - |
2108 | next = *ptr++; never executed: next = *ptr++; | 0 |
2109 | } | - |
2110 | else return 0; executed: return 0; Execution Count:181 | 181 |
2111 | | - |
2112 | | - |
2113 | | - |
2114 | if ((options & 0x00000008) != 0) evaluated: (options & 0x00000008) != 0 yes Evaluation Count:2 | yes Evaluation Count:174 |
| 2-174 |
2115 | { | - |
2116 | for (;;) | - |
2117 | { | - |
2118 | while (((*ptr) <= 255u) && (cd->ctypes[*ptr] & 0x01) != 0) ptr++; partially evaluated: ((*ptr) <= 255u) yes Evaluation Count:4 | no Evaluation Count:0 |
partially evaluated: (cd->ctypes[*ptr] & 0x01) != 0 no Evaluation Count:0 | yes Evaluation Count:4 |
| 0-4 |
2119 | if (*ptr == '\043') evaluated: *ptr == '\043' yes Evaluation Count:2 | yes Evaluation Count:2 |
| 2 |
2120 | { | - |
2121 | ptr++; | - |
2122 | while (*ptr != 0) partially evaluated: *ptr != 0 yes Evaluation Count:18 | no Evaluation Count:0 |
| 0-18 |
2123 | { | - |
2124 | if (((cd->nltype != 0)? ((ptr) < cd->end_pattern && _pcre16_is_newline((ptr), cd->nltype, cd->end_pattern, &(cd->nllen), utf)) : ((ptr) <= cd->end_pattern - cd->nllen && (ptr)[0] == cd->nl[0] && (cd->nllen == 1 || (ptr)[1] == cd->nl[1]) ) )) { ptr += cd->nllen; break; } partially evaluated: (cd->nltype != 0) no Evaluation Count:0 | yes Evaluation Count:18 |
executed: break; Execution Count:2 | 0-18 |
2125 | ptr++; | - |
2126 | | - |
2127 | if (utf) if ((*ptr & 0xfc00) == 0xdc00) ptr++; partially evaluated: utf yes Evaluation Count:16 | no Evaluation Count:0 |
partially evaluated: (*ptr & 0xfc00) == 0xdc00 no Evaluation Count:0 | yes Evaluation Count:16 |
| 0-16 |
2128 | | - |
2129 | } executed: } Execution Count:16 | 16 |
2130 | } executed: } Execution Count:2 | 2 |
2131 | else break; executed: break; Execution Count:2 | 2 |
2132 | } | - |
2133 | } executed: } Execution Count:2 | 2 |
2134 | | - |
2135 | | - |
2136 | | - |
2137 | if (*ptr == '\052' || *ptr == '\077' || evaluated: *ptr == '\052' yes Evaluation Count:2 | yes Evaluation Count:174 |
partially evaluated: *ptr == '\077' no Evaluation Count:0 | yes Evaluation Count:174 |
| 0-174 |
2138 | _pcre16_strncmp_uc_c8((ptr), ("\173" "\060" "\054"), (3)) == 0) partially evaluated: _pcre16_strncmp_uc_c8((ptr), ("\173" "\060" "\054"), (3)) == 0 no Evaluation Count:0 | yes Evaluation Count:174 |
| 0-174 |
2139 | return 0; executed: return 0; Execution Count:2 | 2 |
2140 | | - |
2141 | | - |
2142 | | - |
2143 | | - |
2144 | if (next >= 0) switch(op_code) evaluated: next >= 0 yes Evaluation Count:66 | yes Evaluation Count:108 |
| 66-108 |
2145 | { | - |
2146 | case OP_CHAR: | - |
2147 | | - |
2148 | c = *previous; if (utf && (c & 0xfc00) == 0xd800) { c = (((c & 0x3ff) << 10) | (previous[1] & 0x3ff)) + 0x10000; };; never evaluated: (c & 0xfc00) == 0xd800 | 0 |
2149 | | - |
2150 | | - |
2151 | | - |
2152 | return c != next; never executed: return c != next; | 0 |
2153 | | - |
2154 | | - |
2155 | | - |
2156 | | - |
2157 | | - |
2158 | case OP_CHARI: | - |
2159 | | - |
2160 | c = *previous; if (utf && (c & 0xfc00) == 0xd800) { c = (((c & 0x3ff) << 10) | (previous[1] & 0x3ff)) + 0x10000; };; never evaluated: (c & 0xfc00) == 0xd800 | 0 |
2161 | | - |
2162 | | - |
2163 | | - |
2164 | if (c == next) return 0; never evaluated: c == next never executed: return 0; | 0 |
2165 | | - |
2166 | if (utf) | 0 |
2167 | { | - |
2168 | unsigned int othercase; | - |
2169 | if (next < 128) othercase = cd->fcc[next]; else never evaluated: next < 128 never executed: othercase = cd->fcc[next]; | 0 |
2170 | | - |
2171 | othercase = ((unsigned int)next + (_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[((unsigned int)next) / 128] * 128 + ((unsigned int)next) % 128])->other_case); never executed: othercase = ((unsigned int)next + (_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[((unsigned int)next) / 128] * 128 + ((unsigned int)next) % 128])->other_case); | 0 |
2172 | | - |
2173 | | - |
2174 | | - |
2175 | return (unsigned int)c != othercase; never executed: return (unsigned int)c != othercase; | 0 |
2176 | } | - |
2177 | else | - |
2178 | | - |
2179 | return (c != ((((unsigned int)next) <= 255u)? ((cd->fcc)[(unsigned int)next]):(next))); never executed: return (c != ((((unsigned int)next) <= 255u)? ((cd->fcc)[(unsigned int)next]):(next))); | 0 |
2180 | | - |
2181 | | - |
2182 | | - |
2183 | | - |
2184 | | - |
2185 | case OP_NOT: | - |
2186 | return (c = *previous) == next; never executed: return (c = *previous) == next; | 0 |
2187 | | - |
2188 | case OP_NOTI: | - |
2189 | if ((c = *previous) == next) return 1; never evaluated: (c = *previous) == next never executed: return 1; | 0 |
2190 | | - |
2191 | if (utf) | 0 |
2192 | { | - |
2193 | unsigned int othercase; | - |
2194 | if (next < 128) othercase = cd->fcc[next]; else never evaluated: next < 128 never executed: othercase = cd->fcc[next]; | 0 |
2195 | | - |
2196 | othercase = (next + (_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(next) / 128] * 128 + (next) % 128])->other_case); never executed: othercase = (next + (_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(next) / 128] * 128 + (next) % 128])->other_case); | 0 |
2197 | | - |
2198 | | - |
2199 | | - |
2200 | return (unsigned int)c == othercase; never executed: return (unsigned int)c == othercase; | 0 |
2201 | } | - |
2202 | else | - |
2203 | | - |
2204 | return (c == (int)(((((unsigned int)next) <= 255u)? ((cd->fcc)[(unsigned int)next]):(next)))); never executed: return (c == (int)(((((unsigned int)next) <= 255u)? ((cd->fcc)[(unsigned int)next]):(next)))); | 0 |
2205 | | - |
2206 | | - |
2207 | | - |
2208 | | - |
2209 | case OP_DIGIT: | - |
2210 | return next > 127 || (cd->ctypes[next] & 0x04) == 0; never executed: return next > 127 || (cd->ctypes[next] & 0x04) == 0; | 0 |
2211 | | - |
2212 | case OP_NOT_DIGIT: | - |
2213 | return next <= 127 && (cd->ctypes[next] & 0x04) != 0; never executed: return next <= 127 && (cd->ctypes[next] & 0x04) != 0; | 0 |
2214 | | - |
2215 | case OP_WHITESPACE: | - |
2216 | return next > 127 || (cd->ctypes[next] & 0x01) == 0; never executed: return next > 127 || (cd->ctypes[next] & 0x01) == 0; | 0 |
2217 | | - |
2218 | case OP_NOT_WHITESPACE: | - |
2219 | return next <= 127 && (cd->ctypes[next] & 0x01) != 0; never executed: return next <= 127 && (cd->ctypes[next] & 0x01) != 0; | 0 |
2220 | | - |
2221 | case OP_WORDCHAR: | - |
2222 | return next > 127 || (cd->ctypes[next] & 0x10) == 0; executed: return next > 127 || (cd->ctypes[next] & 0x10) == 0; Execution Count:30 | 30 |
2223 | | - |
2224 | case OP_NOT_WORDCHAR: | - |
2225 | return next <= 127 && (cd->ctypes[next] & 0x10) != 0; never executed: return next <= 127 && (cd->ctypes[next] & 0x10) != 0; | 0 |
2226 | | - |
2227 | case OP_HSPACE: | - |
2228 | case OP_NOT_HSPACE: | - |
2229 | switch(next) | - |
2230 | { | - |
2231 | case 0x09: | - |
2232 | case 0x20: | - |
2233 | case 0xa0: | - |
2234 | case 0x1680: | - |
2235 | case 0x180e: | - |
2236 | case 0x2000: | - |
2237 | case 0x2001: | - |
2238 | case 0x2002: | - |
2239 | case 0x2003: | - |
2240 | case 0x2004: | - |
2241 | case 0x2005: | - |
2242 | case 0x2006: | - |
2243 | case 0x2007: | - |
2244 | case 0x2008: | - |
2245 | case 0x2009: | - |
2246 | case 0x200A: | - |
2247 | case 0x202f: | - |
2248 | case 0x205f: | - |
2249 | case 0x3000: | - |
2250 | return op_code == OP_NOT_HSPACE; never executed: return op_code == OP_NOT_HSPACE; | 0 |
2251 | default: | - |
2252 | return op_code != OP_NOT_HSPACE; never executed: return op_code != OP_NOT_HSPACE; | 0 |
2253 | } | - |
2254 | | - |
2255 | case OP_ANYNL: code before this statement never executed: case OP_ANYNL: | 0 |
2256 | case OP_VSPACE: | - |
2257 | case OP_NOT_VSPACE: | - |
2258 | switch(next) | - |
2259 | { | - |
2260 | case 0x0a: | - |
2261 | case 0x0b: | - |
2262 | case 0x0c: | - |
2263 | case 0x0d: | - |
2264 | case 0x85: | - |
2265 | case 0x2028: | - |
2266 | case 0x2029: | - |
2267 | return op_code == OP_NOT_VSPACE; never executed: return op_code == OP_NOT_VSPACE; | 0 |
2268 | default: | - |
2269 | return op_code != OP_NOT_VSPACE; never executed: return op_code != OP_NOT_VSPACE; | 0 |
2270 | } | - |
2271 | | - |
2272 | | - |
2273 | case OP_PROP: | - |
2274 | return check_char_prop(next, previous[0], previous[1], 0); never executed: return check_char_prop(next, previous[0], previous[1], 0); | 0 |
2275 | | - |
2276 | case OP_NOTPROP: | - |
2277 | return check_char_prop(next, previous[0], previous[1], 1); never executed: return check_char_prop(next, previous[0], previous[1], 1); | 0 |
2278 | | - |
2279 | | - |
2280 | default: | - |
2281 | return 0; executed: return 0; Execution Count:36 | 36 |
2282 | } | 0 |
2283 | switch(op_code) | - |
2284 | { | - |
2285 | case OP_CHAR: | - |
2286 | case OP_CHARI: | - |
2287 | | - |
2288 | c = *previous; if (utf && (c & 0xfc00) == 0xd800) { c = (((c & 0x3ff) << 10) | (previous[1] & 0x3ff)) + 0x10000; };; never evaluated: (c & 0xfc00) == 0xd800 | 0 |
2289 | | - |
2290 | | - |
2291 | | - |
2292 | switch(-next) | - |
2293 | { | - |
2294 | case ESC_d: | - |
2295 | return c > 127 || (cd->ctypes[c] & 0x04) == 0; never executed: return c > 127 || (cd->ctypes[c] & 0x04) == 0; | 0 |
2296 | | - |
2297 | case ESC_D: | - |
2298 | return c <= 127 && (cd->ctypes[c] & 0x04) != 0; never executed: return c <= 127 && (cd->ctypes[c] & 0x04) != 0; | 0 |
2299 | | - |
2300 | case ESC_s: | - |
2301 | return c > 127 || (cd->ctypes[c] & 0x01) == 0; never executed: return c > 127 || (cd->ctypes[c] & 0x01) == 0; | 0 |
2302 | | - |
2303 | case ESC_S: | - |
2304 | return c <= 127 && (cd->ctypes[c] & 0x01) != 0; never executed: return c <= 127 && (cd->ctypes[c] & 0x01) != 0; | 0 |
2305 | | - |
2306 | case ESC_w: | - |
2307 | return c > 127 || (cd->ctypes[c] & 0x10) == 0; never executed: return c > 127 || (cd->ctypes[c] & 0x10) == 0; | 0 |
2308 | | - |
2309 | case ESC_W: | - |
2310 | return c <= 127 && (cd->ctypes[c] & 0x10) != 0; never executed: return c <= 127 && (cd->ctypes[c] & 0x10) != 0; | 0 |
2311 | | - |
2312 | case ESC_h: | - |
2313 | case ESC_H: | - |
2314 | switch(c) | - |
2315 | { | - |
2316 | case 0x09: | - |
2317 | case 0x20: | - |
2318 | case 0xa0: | - |
2319 | case 0x1680: | - |
2320 | case 0x180e: | - |
2321 | case 0x2000: | - |
2322 | case 0x2001: | - |
2323 | case 0x2002: | - |
2324 | case 0x2003: | - |
2325 | case 0x2004: | - |
2326 | case 0x2005: | - |
2327 | case 0x2006: | - |
2328 | case 0x2007: | - |
2329 | case 0x2008: | - |
2330 | case 0x2009: | - |
2331 | case 0x200A: | - |
2332 | case 0x202f: | - |
2333 | case 0x205f: | - |
2334 | case 0x3000: | - |
2335 | return -next != ESC_h; never executed: return -next != ESC_h; | 0 |
2336 | default: | - |
2337 | return -next == ESC_h; never executed: return -next == ESC_h; | 0 |
2338 | } | - |
2339 | | - |
2340 | case ESC_v: code before this statement never executed: case ESC_v: | 0 |
2341 | case ESC_V: | - |
2342 | switch(c) | - |
2343 | { | - |
2344 | case 0x0a: | - |
2345 | case 0x0b: | - |
2346 | case 0x0c: | - |
2347 | case 0x0d: | - |
2348 | case 0x85: | - |
2349 | case 0x2028: | - |
2350 | case 0x2029: | - |
2351 | return -next != ESC_v; never executed: return -next != ESC_v; | 0 |
2352 | default: | - |
2353 | return -next == ESC_v; never executed: return -next == ESC_v; | 0 |
2354 | } | - |
2355 | | - |
2356 | | - |
2357 | | - |
2358 | | - |
2359 | | - |
2360 | | - |
2361 | case ESC_du: code before this statement never executed: case ESC_du: | 0 |
2362 | case ESC_DU: | - |
2363 | case ESC_wu: | - |
2364 | case ESC_WU: | - |
2365 | case ESC_su: | - |
2366 | case ESC_SU: | - |
2367 | { | - |
2368 | int temperrorcode = 0; | - |
2369 | ptr = substitutes[-next - ESC_DU]; | - |
2370 | next = check_escape(&ptr, &temperrorcode, 0, options, 0); | - |
2371 | if (temperrorcode != 0) return 0; never evaluated: temperrorcode != 0 never executed: return 0; | 0 |
2372 | ptr++; | - |
2373 | } | - |
2374 | | - |
2375 | | - |
2376 | case ESC_p: | - |
2377 | case ESC_P: | - |
2378 | { | - |
2379 | int ptype, pdata, errorcodeptr; | - |
2380 | BOOL negated; | - |
2381 | | - |
2382 | ptr--; | - |
2383 | ptype = get_ucp(&ptr, &negated, &pdata, &errorcodeptr); | - |
2384 | if (ptype < 0) return 0; never evaluated: ptype < 0 never executed: return 0; | 0 |
2385 | ptr++; | - |
2386 | | - |
2387 | | - |
2388 | | - |
2389 | | - |
2390 | | - |
2391 | if (*ptr == '\052' || *ptr == '\077' || never evaluated: *ptr == '\052' never evaluated: *ptr == '\077' | 0 |
2392 | _pcre16_strncmp_uc_c8((ptr), ("\173" "\060" "\054"), (3)) == 0) never evaluated: _pcre16_strncmp_uc_c8((ptr), ("\173" "\060" "\054"), (3)) == 0 | 0 |
2393 | return 0; never executed: return 0; | 0 |
2394 | | - |
2395 | | - |
2396 | | - |
2397 | return check_char_prop(c, ptype, pdata, (next == -ESC_P) != negated); never executed: return check_char_prop(c, ptype, pdata, (next == -ESC_P) != negated); | 0 |
2398 | } | - |
2399 | | - |
2400 | | - |
2401 | default: | - |
2402 | return 0; never executed: return 0; | 0 |
2403 | } | - |
2404 | | - |
2405 | | - |
2406 | | - |
2407 | | - |
2408 | | - |
2409 | | - |
2410 | | - |
2411 | case OP_DIGIT: | - |
2412 | return next == -ESC_D || next == -ESC_s || next == -ESC_W || | 0 |
2413 | next == -ESC_h || next == -ESC_v || next == -ESC_R; never executed: return next == -ESC_D || next == -ESC_s || next == -ESC_W || next == -ESC_h || next == -ESC_v || next == -ESC_R; | 0 |
2414 | | - |
2415 | case OP_NOT_DIGIT: | - |
2416 | return next == -ESC_d; never executed: return next == -ESC_d; | 0 |
2417 | | - |
2418 | case OP_WHITESPACE: | - |
2419 | return next == -ESC_S || next == -ESC_d || next == -ESC_w || next == -ESC_R; never executed: return next == -ESC_S || next == -ESC_d || next == -ESC_w || next == -ESC_R; | 0 |
2420 | | - |
2421 | case OP_NOT_WHITESPACE: | - |
2422 | return next == -ESC_s || next == -ESC_h || next == -ESC_v; never executed: return next == -ESC_s || next == -ESC_h || next == -ESC_v; | 0 |
2423 | | - |
2424 | case OP_HSPACE: | - |
2425 | return next == -ESC_S || next == -ESC_H || next == -ESC_d || | 0 |
2426 | next == -ESC_w || next == -ESC_v || next == -ESC_R; never executed: return next == -ESC_S || next == -ESC_H || next == -ESC_d || next == -ESC_w || next == -ESC_v || next == -ESC_R; | 0 |
2427 | | - |
2428 | case OP_NOT_HSPACE: | - |
2429 | return next == -ESC_h; never executed: return next == -ESC_h; | 0 |
2430 | | - |
2431 | | - |
2432 | case OP_ANYNL: | - |
2433 | case OP_VSPACE: | - |
2434 | return next == -ESC_V || next == -ESC_d || next == -ESC_w; never executed: return next == -ESC_V || next == -ESC_d || next == -ESC_w; | 0 |
2435 | | - |
2436 | case OP_NOT_VSPACE: | - |
2437 | return next == -ESC_v || next == -ESC_R; never executed: return next == -ESC_v || next == -ESC_R; | 0 |
2438 | | - |
2439 | case OP_WORDCHAR: | - |
2440 | return next == -ESC_W || next == -ESC_s || next == -ESC_h || | 0 |
2441 | next == -ESC_v || next == -ESC_R; never executed: return next == -ESC_W || next == -ESC_s || next == -ESC_h || next == -ESC_v || next == -ESC_R; | 0 |
2442 | | - |
2443 | case OP_NOT_WORDCHAR: | - |
2444 | return next == -ESC_w || next == -ESC_d; never executed: return next == -ESC_w || next == -ESC_d; | 0 |
2445 | | - |
2446 | default: | - |
2447 | return 0; executed: return 0; Execution Count:108 | 108 |
2448 | } | - |
2449 | | - |
2450 | | - |
2451 | } | 0 |
2452 | static BOOL | - |
2453 | compile_branch(int *optionsptr, pcre_uchar **codeptr, | - |
2454 | const pcre_uchar **ptrptr, int *errorcodeptr, pcre_int32 *firstcharptr, | - |
2455 | pcre_int32 *reqcharptr, branch_chain *bcptr, int cond_depth, | - |
2456 | compile_data *cd, int *lengthptr) | - |
2457 | { | - |
2458 | int repeat_type, op_type; | - |
2459 | int repeat_min = 0, repeat_max = 0; | - |
2460 | int bravalue = 0; | - |
2461 | int greedy_default, greedy_non_default; | - |
2462 | pcre_int32 firstchar, reqchar; | - |
2463 | pcre_int32 zeroreqchar, zerofirstchar; | - |
2464 | pcre_int32 req_caseopt, reqvary, tempreqvary; | - |
2465 | int options = *optionsptr; | - |
2466 | int after_manual_callout = 0; | - |
2467 | int length_prevgroup = 0; | - |
2468 | register int c; | - |
2469 | register pcre_uchar *code = *codeptr; | - |
2470 | pcre_uchar *last_code = code; | - |
2471 | pcre_uchar *orig_code = code; | - |
2472 | pcre_uchar *tempcode; | - |
2473 | BOOL inescq = 0; | - |
2474 | BOOL groupsetfirstchar = 0; | - |
2475 | const pcre_uchar *ptr = *ptrptr; | - |
2476 | const pcre_uchar *tempptr; | - |
2477 | const pcre_uchar *nestptr = ((void *)0); | - |
2478 | pcre_uchar *previous = ((void *)0); | - |
2479 | pcre_uchar *previous_callout = ((void *)0); | - |
2480 | pcre_uchar *save_hwm = ((void *)0); | - |
2481 | pcre_uint8 classbits[32]; | - |
2482 | | - |
2483 | | - |
2484 | | - |
2485 | | - |
2486 | | - |
2487 | | - |
2488 | | - |
2489 | BOOL utf = (options & 0x00000800) != 0; | - |
2490 | pcre_uchar utf_chars[6]; | - |
2491 | | - |
2492 | | - |
2493 | | - |
2494 | | - |
2495 | | - |
2496 | | - |
2497 | | - |
2498 | BOOL xclass; | - |
2499 | pcre_uchar *class_uchardata; | - |
2500 | pcre_uchar *class_uchardata_base; | - |
2501 | greedy_default = ((options & 0x00000200) != 0); | - |
2502 | greedy_non_default = greedy_default ^ 1; | - |
2503 | firstchar = reqchar = zerofirstchar = zeroreqchar = (-2); | - |
2504 | | - |
2505 | | - |
2506 | | - |
2507 | | - |
2508 | | - |
2509 | | - |
2510 | | - |
2511 | req_caseopt = ((options & 0x00000001) != 0)? 0x10000000l:0; evaluated: ((options & 0x00000001) != 0) yes Evaluation Count:80 | yes Evaluation Count:1134 |
| 80-1134 |
2512 | | - |
2513 | | - |
2514 | | - |
2515 | for (;; ptr++) | - |
2516 | { | - |
2517 | BOOL negate_class; | - |
2518 | BOOL should_flip_negation; | - |
2519 | BOOL possessive_quantifier; | - |
2520 | BOOL is_quantifier; | - |
2521 | BOOL is_recurse; | - |
2522 | BOOL reset_bracount; | - |
2523 | int class_has_8bitchar; | - |
2524 | int class_single_char; | - |
2525 | int newoptions; | - |
2526 | int recno; | - |
2527 | int refsign; | - |
2528 | int skipbytes; | - |
2529 | int subreqchar; | - |
2530 | int subfirstchar; | - |
2531 | int terminator; | - |
2532 | int mclength; | - |
2533 | int tempbracount; | - |
2534 | pcre_uchar mcbuffer[8]; | - |
2535 | | - |
2536 | | - |
2537 | | - |
2538 | c = *ptr; | - |
2539 | | - |
2540 | | - |
2541 | | - |
2542 | | - |
2543 | if (c == 0 && nestptr != ((void *)0)) evaluated: c == 0 yes Evaluation Count:718 | yes Evaluation Count:20734 |
evaluated: nestptr != ((void *)0) yes Evaluation Count:4 | yes Evaluation Count:714 |
| 4-20734 |
2544 | { | - |
2545 | ptr = nestptr; | - |
2546 | nestptr = ((void *)0); | - |
2547 | c = *ptr; | - |
2548 | } executed: } Execution Count:4 | 4 |
2549 | | - |
2550 | | - |
2551 | | - |
2552 | | - |
2553 | if (lengthptr != ((void *)0)) evaluated: lengthptr != ((void *)0) yes Evaluation Count:10776 | yes Evaluation Count:10676 |
| 10676-10776 |
2554 | { | - |
2555 | | - |
2556 | | - |
2557 | | - |
2558 | if (code > cd->start_workspace + cd->workspace_size - | 0-10776 |
2559 | (100)) partially evaluated: code > cd->start_workspace + cd->workspace_size - (100) no Evaluation Count:0 | yes Evaluation Count:10776 |
| 0-10776 |
2560 | { | - |
2561 | *errorcodeptr = ERR52; | - |
2562 | goto FAILED; never executed: goto FAILED; | 0 |
2563 | } | - |
2564 | | - |
2565 | | - |
2566 | | - |
2567 | | - |
2568 | | - |
2569 | | - |
2570 | | - |
2571 | if (code < last_code) code = last_code; partially evaluated: code < last_code no Evaluation Count:0 | yes Evaluation Count:10776 |
never executed: code = last_code; | 0-10776 |
2572 | | - |
2573 | | - |
2574 | | - |
2575 | if ((2147483647 - 20) - *lengthptr < code - last_code) partially evaluated: (2147483647 - 20) - *lengthptr < code - last_code no Evaluation Count:0 | yes Evaluation Count:10776 |
| 0-10776 |
2576 | { | - |
2577 | *errorcodeptr = ERR20; | - |
2578 | goto FAILED; never executed: goto FAILED; | 0 |
2579 | } | - |
2580 | | - |
2581 | *lengthptr += (int)(code - last_code); | - |
2582 | ; | - |
2583 | | - |
2584 | | - |
2585 | | - |
2586 | | - |
2587 | | - |
2588 | | - |
2589 | if (previous != ((void *)0)) evaluated: previous != ((void *)0) yes Evaluation Count:9713 | yes Evaluation Count:1063 |
| 1063-9713 |
2590 | { | - |
2591 | if (previous > orig_code) evaluated: previous > orig_code yes Evaluation Count:8962 | yes Evaluation Count:751 |
| 751-8962 |
2592 | { | - |
2593 | memmove(orig_code, previous, ((code - previous) << 1)); | - |
2594 | code -= previous - orig_code; | - |
2595 | previous = orig_code; | - |
2596 | } executed: } Execution Count:8962 | 8962 |
2597 | } executed: } Execution Count:9713 | 9713 |
2598 | else code = orig_code; executed: code = orig_code; Execution Count:1063 | 1063 |
2599 | | - |
2600 | | - |
2601 | | - |
2602 | | - |
2603 | last_code = code; | - |
2604 | } executed: } Execution Count:10776 | 10776 |
2605 | | - |
2606 | | - |
2607 | | - |
2608 | | - |
2609 | else if (cd->hwm > cd->start_workspace + cd->workspace_size - | 0-10676 |
2610 | (100)) partially evaluated: cd->hwm > cd->start_workspace + cd->workspace_size - (100) no Evaluation Count:0 | yes Evaluation Count:10676 |
| 0-10676 |
2611 | { | - |
2612 | *errorcodeptr = ERR52; | - |
2613 | goto FAILED; never executed: goto FAILED; | 0 |
2614 | } | - |
2615 | | - |
2616 | | - |
2617 | | - |
2618 | if (inescq && c != 0) partially evaluated: inescq no Evaluation Count:0 | yes Evaluation Count:21452 |
| 0-21452 |
2619 | { | - |
2620 | if (c == '\134' && ptr[1] == '\105') never evaluated: c == '\134' never evaluated: ptr[1] == '\105' | 0 |
2621 | { | - |
2622 | inescq = 0; | - |
2623 | ptr++; | - |
2624 | continue; never executed: continue; | 0 |
2625 | } | - |
2626 | else | - |
2627 | { | - |
2628 | if (previous_callout != ((void *)0)) never evaluated: previous_callout != ((void *)0) | 0 |
2629 | { | - |
2630 | if (lengthptr == ((void *)0)) never evaluated: lengthptr == ((void *)0) | 0 |
2631 | complete_callout(previous_callout, ptr, cd); never executed: complete_callout(previous_callout, ptr, cd); | 0 |
2632 | previous_callout = ((void *)0); | - |
2633 | } | 0 |
2634 | if ((options & 0x00004000) != 0) never evaluated: (options & 0x00004000) != 0 | 0 |
2635 | { | - |
2636 | previous_callout = code; | - |
2637 | code = auto_callout(code, ptr, cd); | - |
2638 | } | 0 |
2639 | goto NORMAL_CHAR; never executed: goto NORMAL_CHAR; | 0 |
2640 | } | - |
2641 | } | - |
2642 | | - |
2643 | | - |
2644 | | - |
2645 | | - |
2646 | is_quantifier = | - |
2647 | c == '\052' || c == '\053' || c == '\077' || evaluated: c == '\052' yes Evaluation Count:247 | yes Evaluation Count:21205 |
evaluated: c == '\053' yes Evaluation Count:120 | yes Evaluation Count:21085 |
evaluated: c == '\077' yes Evaluation Count:100 | yes Evaluation Count:20985 |
| 100-21205 |
2648 | (c == '\173' && is_counted_repeat(ptr+1)); evaluated: c == '\173' yes Evaluation Count:26 | yes Evaluation Count:20959 |
evaluated: is_counted_repeat(ptr+1) yes Evaluation Count:24 | yes Evaluation Count:2 |
| 2-20959 |
2649 | | - |
2650 | if (!is_quantifier && previous_callout != ((void *)0) && evaluated: !is_quantifier yes Evaluation Count:20961 | yes Evaluation Count:491 |
partially evaluated: previous_callout != ((void *)0) no Evaluation Count:0 | yes Evaluation Count:20961 |
| 0-20961 |
2651 | after_manual_callout-- <= 0) never evaluated: after_manual_callout-- <= 0 | 0 |
2652 | { | - |
2653 | if (lengthptr == ((void *)0)) never evaluated: lengthptr == ((void *)0) | 0 |
2654 | complete_callout(previous_callout, ptr, cd); never executed: complete_callout(previous_callout, ptr, cd); | 0 |
2655 | previous_callout = ((void *)0); | - |
2656 | } | 0 |
2657 | | - |
2658 | | - |
2659 | | - |
2660 | if ((options & 0x00000008) != 0) evaluated: (options & 0x00000008) != 0 yes Evaluation Count:22 | yes Evaluation Count:21430 |
| 22-21430 |
2661 | { | - |
2662 | if (((*ptr) <= 255u) && (cd->ctypes[c] & 0x01) != 0) continue; partially evaluated: ((*ptr) <= 255u) yes Evaluation Count:22 | no Evaluation Count:0 |
evaluated: (cd->ctypes[c] & 0x01) != 0 yes Evaluation Count:6 | yes Evaluation Count:16 |
executed: continue; Execution Count:6 | 0-22 |
2663 | if (c == '\043') evaluated: c == '\043' yes Evaluation Count:6 | yes Evaluation Count:10 |
| 6-10 |
2664 | { | - |
2665 | ptr++; | - |
2666 | while (*ptr != 0) evaluated: *ptr != 0 yes Evaluation Count:60 | yes Evaluation Count:2 |
| 2-60 |
2667 | { | - |
2668 | if (((cd->nltype != 0)? ((ptr) < cd->end_pattern && _pcre16_is_newline((ptr), cd->nltype, cd->end_pattern, &(cd->nllen), utf)) : ((ptr) <= cd->end_pattern - cd->nllen && (ptr)[0] == cd->nl[0] && (cd->nllen == 1 || (ptr)[1] == cd->nl[1]) ) )) { ptr += cd->nllen - 1; break; } partially evaluated: (cd->nltype != 0) no Evaluation Count:0 | yes Evaluation Count:60 |
executed: break; Execution Count:4 | 0-60 |
2669 | ptr++; | - |
2670 | | - |
2671 | if (utf) if ((*ptr & 0xfc00) == 0xdc00) ptr++; partially evaluated: utf yes Evaluation Count:56 | no Evaluation Count:0 |
partially evaluated: (*ptr & 0xfc00) == 0xdc00 no Evaluation Count:0 | yes Evaluation Count:56 |
| 0-56 |
2672 | | - |
2673 | } executed: } Execution Count:56 | 56 |
2674 | if (*ptr != 0) continue; evaluated: *ptr != 0 yes Evaluation Count:4 | yes Evaluation Count:2 |
executed: continue; Execution Count:4 | 2-4 |
2675 | | - |
2676 | | - |
2677 | c = 0; | - |
2678 | } executed: } Execution Count:2 | 2 |
2679 | } executed: } Execution Count:12 | 12 |
2680 | | - |
2681 | | - |
2682 | | - |
2683 | if ((options & 0x00004000) != 0 && !is_quantifier) partially evaluated: (options & 0x00004000) != 0 no Evaluation Count:0 | yes Evaluation Count:21442 |
never evaluated: !is_quantifier | 0-21442 |
2684 | { | - |
2685 | previous_callout = code; | - |
2686 | code = auto_callout(code, ptr, cd); | - |
2687 | } | 0 |
2688 | | - |
2689 | switch(c) | - |
2690 | { | - |
2691 | | - |
2692 | case 0: | - |
2693 | case '\174': | - |
2694 | case '\051': | - |
2695 | *firstcharptr = firstchar; | - |
2696 | *reqcharptr = reqchar; | - |
2697 | *codeptr = code; | - |
2698 | *ptrptr = ptr; | - |
2699 | if (lengthptr != ((void *)0)) evaluated: lengthptr != ((void *)0) yes Evaluation Count:603 | yes Evaluation Count:600 |
| 600-603 |
2700 | { | - |
2701 | if ((2147483647 - 20) - *lengthptr < code - last_code) partially evaluated: (2147483647 - 20) - *lengthptr < code - last_code no Evaluation Count:0 | yes Evaluation Count:603 |
| 0-603 |
2702 | { | - |
2703 | *errorcodeptr = ERR20; | - |
2704 | goto FAILED; never executed: goto FAILED; | 0 |
2705 | } | - |
2706 | *lengthptr += (int)(code - last_code); | - |
2707 | ; | - |
2708 | } executed: } Execution Count:603 | 603 |
2709 | return 1; executed: return 1; Execution Count:1203 | 1203 |
2710 | | - |
2711 | | - |
2712 | | - |
2713 | | - |
2714 | | - |
2715 | | - |
2716 | case '\136': | - |
2717 | previous = ((void *)0); | - |
2718 | if ((options & 0x00000002) != 0) evaluated: (options & 0x00000002) != 0 yes Evaluation Count:4 | yes Evaluation Count:40 |
| 4-40 |
2719 | { | - |
2720 | if (firstchar == (-2)) firstchar = (-1); partially evaluated: firstchar == (-2) yes Evaluation Count:4 | no Evaluation Count:0 |
executed: firstchar = (-1); Execution Count:4 | 0-4 |
2721 | *code++ = OP_CIRCM; | - |
2722 | } executed: } Execution Count:4 | 4 |
2723 | else *code++ = OP_CIRC; executed: *code++ = OP_CIRC; Execution Count:40 | 40 |
2724 | break; executed: break; Execution Count:44 | 44 |
2725 | | - |
2726 | case '\044': | - |
2727 | previous = ((void *)0); | - |
2728 | *code++ = ((options & 0x00000002) != 0)? OP_DOLLM : OP_DOLL; evaluated: ((options & 0x00000002) != 0) yes Evaluation Count:2 | yes Evaluation Count:16 |
| 2-16 |
2729 | break; executed: break; Execution Count:18 | 18 |
2730 | | - |
2731 | | - |
2732 | | - |
2733 | | - |
2734 | case '\056': | - |
2735 | if (firstchar == (-2)) firstchar = (-1); evaluated: firstchar == (-2) yes Evaluation Count:83 | yes Evaluation Count:152 |
executed: firstchar = (-1); Execution Count:83 | 83-152 |
2736 | zerofirstchar = firstchar; | - |
2737 | zeroreqchar = reqchar; | - |
2738 | previous = code; | - |
2739 | *code++ = ((options & 0x00000004) != 0)? OP_ALLANY: OP_ANY; evaluated: ((options & 0x00000004) != 0) yes Evaluation Count:114 | yes Evaluation Count:121 |
| 114-121 |
2740 | break; executed: break; Execution Count:235 | 235 |
2741 | case '\135': | - |
2742 | if ((cd->external_options & 0x02000000) != 0) never evaluated: (cd->external_options & 0x02000000) != 0 | 0 |
2743 | { | - |
2744 | *errorcodeptr = ERR64; | - |
2745 | goto FAILED; never executed: goto FAILED; | 0 |
2746 | } | - |
2747 | goto NORMAL_CHAR; never executed: goto NORMAL_CHAR; | 0 |
2748 | | - |
2749 | case '\133': | - |
2750 | previous = code; | - |
2751 | | - |
2752 | | - |
2753 | | - |
2754 | | - |
2755 | if ((ptr[1] == '\072' || ptr[1] == '\056' || partially evaluated: ptr[1] == '\072' no Evaluation Count:0 | yes Evaluation Count:58 |
partially evaluated: ptr[1] == '\056' no Evaluation Count:0 | yes Evaluation Count:58 |
| 0-58 |
2756 | ptr[1] == '\075') && partially evaluated: ptr[1] == '\075' no Evaluation Count:0 | yes Evaluation Count:58 |
| 0-58 |
2757 | check_posix_syntax(ptr, &tempptr)) never evaluated: check_posix_syntax(ptr, &tempptr) | 0 |
2758 | { | - |
2759 | *errorcodeptr = (ptr[1] == '\072')? ERR13 : ERR31; never evaluated: (ptr[1] == '\072') | 0 |
2760 | goto FAILED; never executed: goto FAILED; | 0 |
2761 | } | - |
2762 | | - |
2763 | | - |
2764 | | - |
2765 | | - |
2766 | | - |
2767 | negate_class = 0; | - |
2768 | for (;;) | - |
2769 | { | - |
2770 | c = *(++ptr); | - |
2771 | if (c == '\134') evaluated: c == '\134' yes Evaluation Count:4 | yes Evaluation Count:56 |
| 4-56 |
2772 | { | - |
2773 | if (ptr[1] == '\105') partially evaluated: ptr[1] == '\105' no Evaluation Count:0 | yes Evaluation Count:4 |
| 0-4 |
2774 | ptr++; | 0 |
2775 | else if (_pcre16_strncmp_uc_c8((ptr + 1), ("\121" "\134" "\105"), (3)) == 0) partially evaluated: _pcre16_strncmp_uc_c8((ptr + 1), ("\121" "\134" "\105"), (3)) == 0 no Evaluation Count:0 | yes Evaluation Count:4 |
| 0-4 |
2776 | ptr += 3; never executed: ptr += 3; | 0 |
2777 | else | - |
2778 | break; executed: break; Execution Count:4 | 4 |
2779 | } | - |
2780 | else if (!negate_class && c == '\136') evaluated: !negate_class yes Evaluation Count:54 | yes Evaluation Count:2 |
evaluated: c == '\136' yes Evaluation Count:2 | yes Evaluation Count:52 |
| 2-54 |
2781 | negate_class = 1; executed: negate_class = 1; Execution Count:2 | 2 |
2782 | else break; executed: break; Execution Count:54 | 54 |
2783 | } | - |
2784 | | - |
2785 | | - |
2786 | | - |
2787 | | - |
2788 | | - |
2789 | | - |
2790 | if (c == '\135' && partially evaluated: c == '\135' no Evaluation Count:0 | yes Evaluation Count:58 |
| 0-58 |
2791 | (cd->external_options & 0x02000000) != 0) never evaluated: (cd->external_options & 0x02000000) != 0 | 0 |
2792 | { | - |
2793 | *code++ = negate_class? OP_ALLANY : OP_FAIL; never evaluated: negate_class | 0 |
2794 | if (firstchar == (-2)) firstchar = (-1); never evaluated: firstchar == (-2) never executed: firstchar = (-1); | 0 |
2795 | zerofirstchar = firstchar; | - |
2796 | break; | 0 |
2797 | } | - |
2798 | | - |
2799 | | - |
2800 | | - |
2801 | | - |
2802 | | - |
2803 | should_flip_negation = 0; | - |
2804 | | - |
2805 | | - |
2806 | | - |
2807 | | - |
2808 | | - |
2809 | | - |
2810 | class_has_8bitchar = 0; | - |
2811 | class_single_char = 0; | - |
2812 | | - |
2813 | | - |
2814 | | - |
2815 | | - |
2816 | | - |
2817 | | - |
2818 | memset(classbits, 0, 32 * sizeof(pcre_uint8)); | - |
2819 | | - |
2820 | | - |
2821 | xclass = 0; | - |
2822 | class_uchardata = code + 1 + 2; | - |
2823 | class_uchardata_base = class_uchardata; | - |
2824 | | - |
2825 | | - |
2826 | | - |
2827 | | - |
2828 | | - |
2829 | | - |
2830 | if (c != 0) do partially evaluated: c != 0 yes Evaluation Count:58 | no Evaluation Count:0 |
| 0-58 |
2831 | { | - |
2832 | const pcre_uchar *oldptr; | - |
2833 | | - |
2834 | | - |
2835 | if (utf && (((c) & 0xfc00) == 0xd800)) partially evaluated: utf yes Evaluation Count:112 | no Evaluation Count:0 |
partially evaluated: (((c) & 0xfc00) == 0xd800) no Evaluation Count:0 | yes Evaluation Count:112 |
| 0-112 |
2836 | { | - |
2837 | c = *ptr; if ((c & 0xfc00) == 0xd800) { c = (((c & 0x3ff) << 10) | (ptr[1] & 0x3ff)) + 0x10000; ptr++; };; never evaluated: (c & 0xfc00) == 0xd800 | 0 |
2838 | } | 0 |
2839 | if (lengthptr != ((void *)0)) evaluated: lengthptr != ((void *)0) yes Evaluation Count:56 | yes Evaluation Count:56 |
| 56 |
2840 | { | - |
2841 | *lengthptr += class_uchardata - class_uchardata_base; | - |
2842 | class_uchardata = class_uchardata_base; | - |
2843 | } executed: } Execution Count:56 | 56 |
2844 | | - |
2845 | | - |
2846 | | - |
2847 | | - |
2848 | if (inescq) partially evaluated: inescq no Evaluation Count:0 | yes Evaluation Count:112 |
| 0-112 |
2849 | { | - |
2850 | if (c == '\134' && ptr[1] == '\105') never evaluated: c == '\134' never evaluated: ptr[1] == '\105' | 0 |
2851 | { | - |
2852 | inescq = 0; | - |
2853 | ptr++; | - |
2854 | continue; never executed: continue; | 0 |
2855 | } | - |
2856 | goto CHECK_RANGE; never executed: goto CHECK_RANGE; | 0 |
2857 | } | - |
2858 | | - |
2859 | | - |
2860 | | - |
2861 | | - |
2862 | | - |
2863 | | - |
2864 | | - |
2865 | if (c == '\133' && partially evaluated: c == '\133' no Evaluation Count:0 | yes Evaluation Count:112 |
| 0-112 |
2866 | (ptr[1] == '\072' || ptr[1] == '\056' || never evaluated: ptr[1] == '\072' never evaluated: ptr[1] == '\056' | 0 |
2867 | ptr[1] == '\075') && check_posix_syntax(ptr, &tempptr)) never evaluated: ptr[1] == '\075' never evaluated: check_posix_syntax(ptr, &tempptr) | 0 |
2868 | { | - |
2869 | BOOL local_negate = 0; | - |
2870 | int posix_class, taboffset, tabopt; | - |
2871 | register const pcre_uint8 *cbits = cd->cbits; | - |
2872 | pcre_uint8 pbits[32]; | - |
2873 | | - |
2874 | if (ptr[1] != '\072') never evaluated: ptr[1] != '\072' | 0 |
2875 | { | - |
2876 | *errorcodeptr = ERR31; | - |
2877 | goto FAILED; never executed: goto FAILED; | 0 |
2878 | } | - |
2879 | | - |
2880 | ptr += 2; | - |
2881 | if (*ptr == '\136') never evaluated: *ptr == '\136' | 0 |
2882 | { | - |
2883 | local_negate = 1; | - |
2884 | should_flip_negation = 1; | - |
2885 | ptr++; | - |
2886 | } | 0 |
2887 | | - |
2888 | posix_class = check_posix_name(ptr, (int)(tempptr - ptr)); | - |
2889 | if (posix_class < 0) never evaluated: posix_class < 0 | 0 |
2890 | { | - |
2891 | *errorcodeptr = ERR30; | - |
2892 | goto FAILED; never executed: goto FAILED; | 0 |
2893 | } | - |
2894 | | - |
2895 | | - |
2896 | | - |
2897 | | - |
2898 | | - |
2899 | if ((options & 0x00000001) != 0 && posix_class <= 2) never evaluated: (options & 0x00000001) != 0 never evaluated: posix_class <= 2 | 0 |
2900 | posix_class = 0; never executed: posix_class = 0; | 0 |
2901 | | - |
2902 | | - |
2903 | | - |
2904 | | - |
2905 | | - |
2906 | if ((options & 0x20000000) != 0) never evaluated: (options & 0x20000000) != 0 | 0 |
2907 | { | - |
2908 | int pc = posix_class + ((local_negate)? (sizeof(posix_substitutes) / sizeof(pcre_uchar *))/2 : 0); never evaluated: (local_negate) | 0 |
2909 | if (posix_substitutes[pc] != ((void *)0)) never evaluated: posix_substitutes[pc] != ((void *)0) | 0 |
2910 | { | - |
2911 | nestptr = tempptr + 1; | - |
2912 | ptr = posix_substitutes[pc] - 1; | - |
2913 | continue; never executed: continue; | 0 |
2914 | } | - |
2915 | } | 0 |
2916 | | - |
2917 | | - |
2918 | | - |
2919 | | - |
2920 | | - |
2921 | | - |
2922 | posix_class *= 3; | - |
2923 | | - |
2924 | | - |
2925 | | - |
2926 | memcpy(pbits, cbits + posix_class_maps[posix_class], | - |
2927 | 32 * sizeof(pcre_uint8)); | - |
2928 | | - |
2929 | | - |
2930 | | - |
2931 | taboffset = posix_class_maps[posix_class + 1]; | - |
2932 | tabopt = posix_class_maps[posix_class + 2]; | - |
2933 | | - |
2934 | if (taboffset >= 0) never evaluated: taboffset >= 0 | 0 |
2935 | { | - |
2936 | if (tabopt >= 0) never evaluated: tabopt >= 0 | 0 |
2937 | for (c = 0; c < 32; c++) pbits[c] |= cbits[c + taboffset]; never executed: pbits[c] |= cbits[c + taboffset]; | 0 |
2938 | else | - |
2939 | for (c = 0; c < 32; c++) pbits[c] &= ~cbits[c + taboffset]; never executed: pbits[c] &= ~cbits[c + taboffset]; | 0 |
2940 | } | - |
2941 | | - |
2942 | | - |
2943 | | - |
2944 | | - |
2945 | if (tabopt < 0) tabopt = -tabopt; never evaluated: tabopt < 0 never executed: tabopt = -tabopt; | 0 |
2946 | if (tabopt == 1) pbits[1] &= ~0x3c; never evaluated: tabopt == 1 never executed: pbits[1] &= ~0x3c; | 0 |
2947 | else if (tabopt == 2) pbits[11] &= 0x7f; never evaluated: tabopt == 2 never executed: pbits[11] &= 0x7f; | 0 |
2948 | | - |
2949 | | - |
2950 | | - |
2951 | | - |
2952 | if (local_negate) never evaluated: local_negate | 0 |
2953 | for (c = 0; c < 32; c++) classbits[c] |= ~pbits[c]; never executed: classbits[c] |= ~pbits[c]; | 0 |
2954 | else | - |
2955 | for (c = 0; c < 32; c++) classbits[c] |= pbits[c]; never executed: classbits[c] |= pbits[c]; | 0 |
2956 | | - |
2957 | ptr = tempptr + 1; | - |
2958 | | - |
2959 | class_has_8bitchar = 1; | - |
2960 | | - |
2961 | class_single_char = 2; | - |
2962 | continue; never executed: continue; | 0 |
2963 | } | - |
2964 | if (c == '\134') evaluated: c == '\134' yes Evaluation Count:4 | yes Evaluation Count:108 |
| 4-108 |
2965 | { | - |
2966 | c = check_escape(&ptr, errorcodeptr, cd->bracount, options, 1); | - |
2967 | if (*errorcodeptr != 0) goto FAILED; partially evaluated: *errorcodeptr != 0 no Evaluation Count:0 | yes Evaluation Count:4 |
never executed: goto FAILED; | 0-4 |
2968 | | - |
2969 | if (-c == ESC_b) c = '\010'; partially evaluated: -c == ESC_b no Evaluation Count:0 | yes Evaluation Count:4 |
never executed: c = '\010'; | 0-4 |
2970 | else if (-c == ESC_N) partially evaluated: -c == ESC_N no Evaluation Count:0 | yes Evaluation Count:4 |
| 0-4 |
2971 | { | - |
2972 | *errorcodeptr = ERR71; | - |
2973 | goto FAILED; never executed: goto FAILED; | 0 |
2974 | } | - |
2975 | else if (-c == ESC_Q) partially evaluated: -c == ESC_Q no Evaluation Count:0 | yes Evaluation Count:4 |
| 0-4 |
2976 | { | - |
2977 | if (ptr[1] == '\134' && ptr[2] == '\105') never evaluated: ptr[1] == '\134' never evaluated: ptr[2] == '\105' | 0 |
2978 | { | - |
2979 | ptr += 2; | - |
2980 | } | 0 |
2981 | else inescq = 1; never executed: inescq = 1; | 0 |
2982 | continue; never executed: continue; | 0 |
2983 | } | - |
2984 | else if (-c == ESC_E) continue; partially evaluated: -c == ESC_E no Evaluation Count:0 | yes Evaluation Count:4 |
never executed: continue; | 0-4 |
2985 | | - |
2986 | if (c < 0) partially evaluated: c < 0 no Evaluation Count:0 | yes Evaluation Count:4 |
| 0-4 |
2987 | { | - |
2988 | register const pcre_uint8 *cbits = cd->cbits; | - |
2989 | | - |
2990 | class_has_8bitchar++; | - |
2991 | | - |
2992 | class_single_char += 2; | - |
2993 | | - |
2994 | switch (-c) | - |
2995 | { | - |
2996 | | - |
2997 | case ESC_du: | - |
2998 | case ESC_DU: | - |
2999 | case ESC_wu: | - |
3000 | case ESC_WU: | - |
3001 | case ESC_su: | - |
3002 | case ESC_SU: | - |
3003 | nestptr = ptr; | - |
3004 | ptr = substitutes[-c - ESC_DU] - 1; | - |
3005 | class_has_8bitchar--; | - |
3006 | continue; never executed: continue; | 0 |
3007 | | - |
3008 | case ESC_d: | - |
3009 | for (c = 0; c < 32; c++) classbits[c] |= cbits[c+64]; never executed: classbits[c] |= cbits[c+64]; | 0 |
3010 | continue; never executed: continue; | 0 |
3011 | | - |
3012 | case ESC_D: | - |
3013 | should_flip_negation = 1; | - |
3014 | for (c = 0; c < 32; c++) classbits[c] |= ~cbits[c+64]; never executed: classbits[c] |= ~cbits[c+64]; | 0 |
3015 | continue; never executed: continue; | 0 |
3016 | | - |
3017 | case ESC_w: | - |
3018 | for (c = 0; c < 32; c++) classbits[c] |= cbits[c+160]; never executed: classbits[c] |= cbits[c+160]; | 0 |
3019 | continue; never executed: continue; | 0 |
3020 | | - |
3021 | case ESC_W: | - |
3022 | should_flip_negation = 1; | - |
3023 | for (c = 0; c < 32; c++) classbits[c] |= ~cbits[c+160]; never executed: classbits[c] |= ~cbits[c+160]; | 0 |
3024 | continue; never executed: continue; | 0 |
3025 | | - |
3026 | | - |
3027 | | - |
3028 | | - |
3029 | | - |
3030 | case ESC_s: | - |
3031 | classbits[0] |= cbits[0]; | - |
3032 | classbits[1] |= cbits[0 +1] & ~0x08; | - |
3033 | for (c = 2; c < 32; c++) classbits[c] |= cbits[c+0]; never executed: classbits[c] |= cbits[c+0]; | 0 |
3034 | continue; never executed: continue; | 0 |
3035 | | - |
3036 | case ESC_S: | - |
3037 | should_flip_negation = 1; | - |
3038 | for (c = 0; c < 32; c++) classbits[c] |= ~cbits[c+0]; never executed: classbits[c] |= ~cbits[c+0]; | 0 |
3039 | classbits[1] |= 0x08; | - |
3040 | continue; never executed: continue; | 0 |
3041 | | - |
3042 | case ESC_h: | - |
3043 | classbits[0x09/8] |= (1 << (0x09%8)); | - |
3044 | classbits[0x20/8] |= (1 << (0x20%8)); | - |
3045 | classbits[0xa0/8] |= (1 << (0xa0%8)); | - |
3046 | | - |
3047 | xclass = 1; | - |
3048 | *class_uchardata++ = 1; | - |
3049 | *class_uchardata++ = 0x1680; | - |
3050 | *class_uchardata++ = 1; | - |
3051 | *class_uchardata++ = 0x180e; | - |
3052 | *class_uchardata++ = 2; | - |
3053 | *class_uchardata++ = 0x2000; | - |
3054 | *class_uchardata++ = 0x200a; | - |
3055 | *class_uchardata++ = 1; | - |
3056 | *class_uchardata++ = 0x202f; | - |
3057 | *class_uchardata++ = 1; | - |
3058 | *class_uchardata++ = 0x205f; | - |
3059 | *class_uchardata++ = 1; | - |
3060 | *class_uchardata++ = 0x3000; | - |
3061 | continue; never executed: continue; | 0 |
3062 | | - |
3063 | case ESC_H: | - |
3064 | for (c = 0; c < 32; c++) | 0 |
3065 | { | - |
3066 | int x = 0xff; | - |
3067 | switch (c) | - |
3068 | { | - |
3069 | case 0x09/8: x ^= 1 << (0x09%8); break; | 0 |
3070 | case 0x20/8: x ^= 1 << (0x20%8); break; | 0 |
3071 | case 0xa0/8: x ^= 1 << (0xa0%8); break; | 0 |
3072 | default: break; | 0 |
3073 | } | - |
3074 | classbits[c] |= x; | - |
3075 | } | 0 |
3076 | | - |
3077 | xclass = 1; | - |
3078 | *class_uchardata++ = 2; | - |
3079 | *class_uchardata++ = 0x0100; | - |
3080 | *class_uchardata++ = 0x167f; | - |
3081 | *class_uchardata++ = 2; | - |
3082 | *class_uchardata++ = 0x1681; | - |
3083 | *class_uchardata++ = 0x180d; | - |
3084 | *class_uchardata++ = 2; | - |
3085 | *class_uchardata++ = 0x180f; | - |
3086 | *class_uchardata++ = 0x1fff; | - |
3087 | *class_uchardata++ = 2; | - |
3088 | *class_uchardata++ = 0x200b; | - |
3089 | *class_uchardata++ = 0x202e; | - |
3090 | *class_uchardata++ = 2; | - |
3091 | *class_uchardata++ = 0x2030; | - |
3092 | *class_uchardata++ = 0x205e; | - |
3093 | *class_uchardata++ = 2; | - |
3094 | *class_uchardata++ = 0x2060; | - |
3095 | *class_uchardata++ = 0x2fff; | - |
3096 | *class_uchardata++ = 2; | - |
3097 | *class_uchardata++ = 0x3001; | - |
3098 | | - |
3099 | if (utf) | 0 |
3100 | class_uchardata += _pcre16_ord2utf(0x10ffff, class_uchardata); never executed: class_uchardata += _pcre16_ord2utf(0x10ffff, class_uchardata); | 0 |
3101 | else | - |
3102 | | - |
3103 | *class_uchardata++ = 0xffff; never executed: *class_uchardata++ = 0xffff; | 0 |
3104 | continue; never executed: continue; | 0 |
3105 | | - |
3106 | case ESC_v: | - |
3107 | classbits[0x0a/8] |= (1 << (0x0a%8)); | - |
3108 | classbits[0x0b/8] |= (1 << (0x0b%8)); | - |
3109 | classbits[0x0c/8] |= (1 << (0x0c%8)); | - |
3110 | classbits[0x0d/8] |= (1 << (0x0d%8)); | - |
3111 | classbits[0x85/8] |= (1 << (0x85%8)); | - |
3112 | | - |
3113 | xclass = 1; | - |
3114 | *class_uchardata++ = 2; | - |
3115 | *class_uchardata++ = 0x2028; | - |
3116 | *class_uchardata++ = 0x2029; | - |
3117 | continue; never executed: continue; | 0 |
3118 | | - |
3119 | case ESC_V: | - |
3120 | for (c = 0; c < 32; c++) | 0 |
3121 | { | - |
3122 | int x = 0xff; | - |
3123 | switch (c) | - |
3124 | { | - |
3125 | case 0x0a/8: x ^= 1 << (0x0a%8); | - |
3126 | x ^= 1 << (0x0b%8); | - |
3127 | x ^= 1 << (0x0c%8); | - |
3128 | x ^= 1 << (0x0d%8); | - |
3129 | break; | 0 |
3130 | case 0x85/8: x ^= 1 << (0x85%8); break; | 0 |
3131 | default: break; | 0 |
3132 | } | - |
3133 | classbits[c] |= x; | - |
3134 | } | 0 |
3135 | | - |
3136 | | - |
3137 | xclass = 1; | - |
3138 | *class_uchardata++ = 2; | - |
3139 | *class_uchardata++ = 0x0100; | - |
3140 | *class_uchardata++ = 0x2027; | - |
3141 | *class_uchardata++ = 2; | - |
3142 | *class_uchardata++ = 0x202a; | - |
3143 | | - |
3144 | if (utf) | 0 |
3145 | class_uchardata += _pcre16_ord2utf(0x10ffff, class_uchardata); never executed: class_uchardata += _pcre16_ord2utf(0x10ffff, class_uchardata); | 0 |
3146 | else | - |
3147 | | - |
3148 | *class_uchardata++ = 0xffff; never executed: *class_uchardata++ = 0xffff; | 0 |
3149 | continue; never executed: continue; | 0 |
3150 | | - |
3151 | | - |
3152 | case ESC_p: | - |
3153 | case ESC_P: | - |
3154 | { | - |
3155 | BOOL negated; | - |
3156 | int pdata; | - |
3157 | int ptype = get_ucp(&ptr, &negated, &pdata, errorcodeptr); | - |
3158 | if (ptype < 0) goto FAILED; never evaluated: ptype < 0 never executed: goto FAILED; | 0 |
3159 | xclass = 1; | - |
3160 | *class_uchardata++ = ((-c == ESC_p) != negated)? never evaluated: ((-c == ESC_p) != negated) | 0 |
3161 | 3 : 4; | - |
3162 | *class_uchardata++ = ptype; | - |
3163 | *class_uchardata++ = pdata; | - |
3164 | class_has_8bitchar--; | - |
3165 | continue; never executed: continue; | 0 |
3166 | } | - |
3167 | | - |
3168 | | - |
3169 | | - |
3170 | | - |
3171 | | - |
3172 | default: | - |
3173 | if ((options & 0x00000040) != 0) never evaluated: (options & 0x00000040) != 0 | 0 |
3174 | { | - |
3175 | *errorcodeptr = ERR7; | - |
3176 | goto FAILED; never executed: goto FAILED; | 0 |
3177 | } | - |
3178 | class_has_8bitchar--; | - |
3179 | class_single_char -= 2; | - |
3180 | c = *ptr; | - |
3181 | break; | 0 |
3182 | } | - |
3183 | } | 0 |
3184 | | - |
3185 | | - |
3186 | | - |
3187 | | - |
3188 | } executed: } Execution Count:4 | 4 |
3189 | | - |
3190 | | - |
3191 | | - |
3192 | | - |
3193 | | - |
3194 | | - |
3195 | CHECK_RANGE: code before this statement executed: CHECK_RANGE: Execution Count:112 | 112 |
3196 | while (ptr[1] == '\134' && ptr[2] == '\105') partially evaluated: ptr[1] == '\134' no Evaluation Count:0 | yes Evaluation Count:112 |
never evaluated: ptr[2] == '\105' | 0-112 |
3197 | { | - |
3198 | inescq = 0; | - |
3199 | ptr += 2; | - |
3200 | } | 0 |
3201 | | - |
3202 | oldptr = ptr; | - |
3203 | | - |
3204 | | - |
3205 | | - |
3206 | if (c == '\015' || c == '\012') cd->external_flags |= 0x0800; partially evaluated: c == '\015' no Evaluation Count:0 | yes Evaluation Count:112 |
partially evaluated: c == '\012' no Evaluation Count:0 | yes Evaluation Count:112 |
never executed: cd->external_flags |= 0x0800; | 0-112 |
3207 | | - |
3208 | | - |
3209 | | - |
3210 | if (!inescq && ptr[1] == '\055') partially evaluated: !inescq yes Evaluation Count:112 | no Evaluation Count:0 |
evaluated: ptr[1] == '\055' yes Evaluation Count:14 | yes Evaluation Count:98 |
| 0-112 |
3211 | { | - |
3212 | int d; | - |
3213 | ptr += 2; | - |
3214 | while (*ptr == '\134' && ptr[1] == '\105') ptr += 2; evaluated: *ptr == '\134' yes Evaluation Count:4 | yes Evaluation Count:10 |
partially evaluated: ptr[1] == '\105' no Evaluation Count:0 | yes Evaluation Count:4 |
never executed: ptr += 2; | 0-10 |
3215 | | - |
3216 | | - |
3217 | | - |
3218 | | - |
3219 | while (*ptr == '\134' && ptr[1] == '\121') evaluated: *ptr == '\134' yes Evaluation Count:4 | yes Evaluation Count:10 |
partially evaluated: ptr[1] == '\121' no Evaluation Count:0 | yes Evaluation Count:4 |
| 0-10 |
3220 | { | - |
3221 | ptr += 2; | - |
3222 | if (*ptr == '\134' && ptr[1] == '\105') never evaluated: *ptr == '\134' never evaluated: ptr[1] == '\105' | 0 |
3223 | { ptr += 2; continue; } never executed: continue; | 0 |
3224 | inescq = 1; | - |
3225 | break; | 0 |
3226 | } | - |
3227 | | - |
3228 | if (*ptr == 0 || (!inescq && *ptr == '\135')) partially evaluated: *ptr == 0 no Evaluation Count:0 | yes Evaluation Count:14 |
partially evaluated: !inescq yes Evaluation Count:14 | no Evaluation Count:0 |
partially evaluated: *ptr == '\135' no Evaluation Count:0 | yes Evaluation Count:14 |
| 0-14 |
3229 | { | - |
3230 | ptr = oldptr; | - |
3231 | goto LONE_SINGLE_CHARACTER; never executed: goto LONE_SINGLE_CHARACTER; | 0 |
3232 | } | - |
3233 | | - |
3234 | | - |
3235 | if (utf) partially evaluated: utf yes Evaluation Count:14 | no Evaluation Count:0 |
| 0-14 |
3236 | { | - |
3237 | d = *ptr; if ((d & 0xfc00) == 0xd800) { d = (((d & 0x3ff) << 10) | (ptr[1] & 0x3ff)) + 0x10000; ptr++; };; partially evaluated: (d & 0xfc00) == 0xd800 no Evaluation Count:0 | yes Evaluation Count:14 |
| 0-14 |
3238 | } executed: } Execution Count:14 | 14 |
3239 | else | - |
3240 | | - |
3241 | d = *ptr; never executed: d = *ptr; | 0 |
3242 | | - |
3243 | | - |
3244 | | - |
3245 | | - |
3246 | | - |
3247 | if (!inescq && d == '\134') partially evaluated: !inescq yes Evaluation Count:14 | no Evaluation Count:0 |
evaluated: d == '\134' yes Evaluation Count:4 | yes Evaluation Count:10 |
| 0-14 |
3248 | { | - |
3249 | d = check_escape(&ptr, errorcodeptr, cd->bracount, options, 1); | - |
3250 | if (*errorcodeptr != 0) goto FAILED; partially evaluated: *errorcodeptr != 0 no Evaluation Count:0 | yes Evaluation Count:4 |
never executed: goto FAILED; | 0-4 |
3251 | | - |
3252 | | - |
3253 | | - |
3254 | if (d < 0) partially evaluated: d < 0 no Evaluation Count:0 | yes Evaluation Count:4 |
| 0-4 |
3255 | { | - |
3256 | if (d == -ESC_b) d = '\010'; else never evaluated: d == -ESC_b never executed: d = '\010'; | 0 |
3257 | { | - |
3258 | ptr = oldptr; | - |
3259 | goto LONE_SINGLE_CHARACTER; never executed: goto LONE_SINGLE_CHARACTER; | 0 |
3260 | } | - |
3261 | } | - |
3262 | } executed: } Execution Count:4 | 4 |
3263 | | - |
3264 | | - |
3265 | | - |
3266 | | - |
3267 | if (d < c) partially evaluated: d < c no Evaluation Count:0 | yes Evaluation Count:14 |
| 0-14 |
3268 | { | - |
3269 | *errorcodeptr = ERR8; | - |
3270 | goto FAILED; never executed: goto FAILED; | 0 |
3271 | } | - |
3272 | | - |
3273 | if (d == c) goto LONE_SINGLE_CHARACTER; partially evaluated: d == c no Evaluation Count:0 | yes Evaluation Count:14 |
never executed: goto LONE_SINGLE_CHARACTER; | 0-14 |
3274 | | - |
3275 | | - |
3276 | | - |
3277 | if (d == '\015' || d == '\012') cd->external_flags |= 0x0800; partially evaluated: d == '\015' no Evaluation Count:0 | yes Evaluation Count:14 |
partially evaluated: d == '\012' no Evaluation Count:0 | yes Evaluation Count:14 |
never executed: cd->external_flags |= 0x0800; | 0-14 |
3278 | | - |
3279 | | - |
3280 | | - |
3281 | class_single_char = 2; | - |
3282 | | - |
3283 | | - |
3284 | | - |
3285 | | - |
3286 | | - |
3287 | | - |
3288 | | - |
3289 | if ((d > 255) || (utf && ((options & 0x00000001) != 0 && d > 127))) evaluated: (d > 255) yes Evaluation Count:4 | yes Evaluation Count:10 |
partially evaluated: utf yes Evaluation Count:10 | no Evaluation Count:0 |
partially evaluated: (options & 0x00000001) != 0 no Evaluation Count:0 | yes Evaluation Count:10 |
| 0-10 |
3290 | | - |
3291 | | - |
3292 | | - |
3293 | | - |
3294 | | - |
3295 | | - |
3296 | { | - |
3297 | xclass = 1; | - |
3298 | | - |
3299 | | - |
3300 | | - |
3301 | | - |
3302 | | - |
3303 | | - |
3304 | | - |
3305 | if (utf && (options & 0x00000001) != 0) partially evaluated: utf yes Evaluation Count:4 | no Evaluation Count:0 |
partially evaluated: (options & 0x00000001) != 0 no Evaluation Count:0 | yes Evaluation Count:4 |
| 0-4 |
3306 | | - |
3307 | | - |
3308 | | - |
3309 | { | - |
3310 | unsigned int occ, ocd; | - |
3311 | unsigned int cc = c; | - |
3312 | unsigned int origd = d; | - |
3313 | while (get_othercase_range(&cc, origd, &occ, &ocd)) never evaluated: get_othercase_range(&cc, origd, &occ, &ocd) | 0 |
3314 | { | - |
3315 | if (occ >= (unsigned int)c && never evaluated: occ >= (unsigned int)c | 0 |
3316 | ocd <= (unsigned int)d) never evaluated: ocd <= (unsigned int)d | 0 |
3317 | continue; never executed: continue; | 0 |
3318 | | - |
3319 | if (occ < (unsigned int)c && never evaluated: occ < (unsigned int)c | 0 |
3320 | ocd >= (unsigned int)c - 1) never evaluated: ocd >= (unsigned int)c - 1 | 0 |
3321 | { | - |
3322 | c = occ; | - |
3323 | continue; never executed: continue; | 0 |
3324 | } | - |
3325 | if (ocd > (unsigned int)d && never evaluated: ocd > (unsigned int)d | 0 |
3326 | occ <= (unsigned int)d + 1) never evaluated: occ <= (unsigned int)d + 1 | 0 |
3327 | { | - |
3328 | d = ocd; | - |
3329 | continue; never executed: continue; | 0 |
3330 | } | - |
3331 | | - |
3332 | if (occ == ocd) never evaluated: occ == ocd | 0 |
3333 | { | - |
3334 | *class_uchardata++ = 1; | - |
3335 | } | 0 |
3336 | else | - |
3337 | { | - |
3338 | *class_uchardata++ = 2; | - |
3339 | class_uchardata += _pcre16_ord2utf(occ, class_uchardata); | - |
3340 | } | 0 |
3341 | class_uchardata += _pcre16_ord2utf(ocd, class_uchardata); | - |
3342 | } | 0 |
3343 | } | 0 |
3344 | | - |
3345 | | - |
3346 | | - |
3347 | | - |
3348 | | - |
3349 | *class_uchardata++ = 2; | - |
3350 | | - |
3351 | | - |
3352 | if (utf) partially evaluated: utf yes Evaluation Count:4 | no Evaluation Count:0 |
| 0-4 |
3353 | { | - |
3354 | class_uchardata += _pcre16_ord2utf(c, class_uchardata); | - |
3355 | class_uchardata += _pcre16_ord2utf(d, class_uchardata); | - |
3356 | } executed: } Execution Count:4 | 4 |
3357 | else | - |
3358 | { | - |
3359 | *class_uchardata++ = c; | - |
3360 | *class_uchardata++ = d; | - |
3361 | } | 0 |
3362 | if (utf) partially evaluated: utf yes Evaluation Count:4 | no Evaluation Count:0 |
| 0-4 |
3363 | | - |
3364 | continue; executed: continue; Execution Count:4 | 4 |
3365 | if (c > 255) continue; never executed: continue; | 0 |
3366 | | - |
3367 | d = 255; | - |
3368 | | - |
3369 | } | 0 |
3370 | | - |
3371 | | - |
3372 | | - |
3373 | | - |
3374 | | - |
3375 | class_has_8bitchar = 1; | - |
3376 | | - |
3377 | | - |
3378 | | - |
3379 | if (lengthptr == ((void *)0)) for (; c <= d; c++) evaluated: lengthptr == ((void *)0) yes Evaluation Count:5 | yes Evaluation Count:5 |
evaluated: c <= d yes Evaluation Count:130 | yes Evaluation Count:5 |
| 5-130 |
3380 | { | - |
3381 | classbits[c/8] |= (1 << (c&7)); | - |
3382 | if ((options & 0x00000001) != 0) partially evaluated: (options & 0x00000001) != 0 no Evaluation Count:0 | yes Evaluation Count:130 |
| 0-130 |
3383 | { | - |
3384 | int uc = cd->fcc[c]; | - |
3385 | classbits[uc/8] |= (1 << (uc&7)); | - |
3386 | } | 0 |
3387 | } executed: } Execution Count:130 | 130 |
3388 | | - |
3389 | continue; executed: continue; Execution Count:10 | 10 |
3390 | } | - |
3391 | | - |
3392 | | - |
3393 | | - |
3394 | | - |
3395 | | - |
3396 | LONE_SINGLE_CHARACTER: code before this statement executed: LONE_SINGLE_CHARACTER: Execution Count:98 | 98 |
3397 | | - |
3398 | | - |
3399 | if (class_single_char < 2) class_single_char++; evaluated: class_single_char < 2 yes Evaluation Count:80 | yes Evaluation Count:18 |
executed: class_single_char++; Execution Count:80 | 18-80 |
3400 | if (class_single_char == 1 && ptr[1] == '\135' evaluated: class_single_char == 1 yes Evaluation Count:44 | yes Evaluation Count:54 |
evaluated: ptr[1] == '\135' yes Evaluation Count:8 | yes Evaluation Count:36 |
| 8-54 |
3401 | && (!utf || !negate_class || c < (65535 + 1))) partially evaluated: !utf no Evaluation Count:0 | yes Evaluation Count:8 |
evaluated: !negate_class yes Evaluation Count:6 | yes Evaluation Count:2 |
partially evaluated: c < (65535 + 1) yes Evaluation Count:2 | no Evaluation Count:0 |
| 0-8 |
3402 | | - |
3403 | | - |
3404 | | - |
3405 | { | - |
3406 | ptr++; | - |
3407 | zeroreqchar = reqchar; | - |
3408 | | - |
3409 | | - |
3410 | | - |
3411 | if (negate_class) evaluated: negate_class yes Evaluation Count:2 | yes Evaluation Count:6 |
| 2-6 |
3412 | { | - |
3413 | if (firstchar == (-2)) firstchar = (-1); partially evaluated: firstchar == (-2) yes Evaluation Count:2 | no Evaluation Count:0 |
executed: firstchar = (-1); Execution Count:2 | 0-2 |
3414 | zerofirstchar = firstchar; | - |
3415 | *code++ = ((options & 0x00000001) != 0)? OP_NOTI: OP_NOT; partially evaluated: ((options & 0x00000001) != 0) no Evaluation Count:0 | yes Evaluation Count:2 |
| 0-2 |
3416 | *code++ = c; | - |
3417 | goto NOT_CHAR; executed: goto NOT_CHAR; Execution Count:2 | 2 |
3418 | } | - |
3419 | | - |
3420 | | - |
3421 | | - |
3422 | | - |
3423 | | - |
3424 | if (utf && c > 65535) partially evaluated: utf yes Evaluation Count:6 | no Evaluation Count:0 |
partially evaluated: c > 65535 no Evaluation Count:0 | yes Evaluation Count:6 |
| 0-6 |
3425 | mclength = _pcre16_ord2utf(c, mcbuffer); never executed: mclength = _pcre16_ord2utf(c, mcbuffer); | 0 |
3426 | else | - |
3427 | | - |
3428 | { | - |
3429 | mcbuffer[0] = c; | - |
3430 | mclength = 1; | - |
3431 | } executed: } Execution Count:6 | 6 |
3432 | goto ONE_CHAR; executed: goto ONE_CHAR; Execution Count:6 | 6 |
3433 | } | - |
3434 | | - |
3435 | | - |
3436 | | - |
3437 | | - |
3438 | if ((c > 255) || (utf && ((options & 0x00000001) != 0 && c > 127))) partially evaluated: (c > 255) no Evaluation Count:0 | yes Evaluation Count:90 |
partially evaluated: utf yes Evaluation Count:90 | no Evaluation Count:0 |
partially evaluated: (options & 0x00000001) != 0 no Evaluation Count:0 | yes Evaluation Count:90 |
| 0-90 |
3439 | | - |
3440 | | - |
3441 | | - |
3442 | | - |
3443 | | - |
3444 | | - |
3445 | | - |
3446 | { | - |
3447 | xclass = 1; | - |
3448 | *class_uchardata++ = 1; | - |
3449 | | - |
3450 | | - |
3451 | | - |
3452 | if (!utf) | 0 |
3453 | *class_uchardata++ = c; never executed: *class_uchardata++ = c; | 0 |
3454 | else | - |
3455 | | - |
3456 | class_uchardata += _pcre16_ord2utf(c, class_uchardata); never executed: class_uchardata += _pcre16_ord2utf(c, class_uchardata); | 0 |
3457 | if (utf && (options & 0x00000001) != 0) never evaluated: (options & 0x00000001) != 0 | 0 |
3458 | | - |
3459 | { | - |
3460 | unsigned int othercase; | - |
3461 | if ((int)(othercase = (c + (_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(c) / 128] * 128 + (c) % 128])->other_case)) != c) never evaluated: (int)(othercase = (c + (_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(c) / 128] * 128 + (c) % 128])->other_case)) != c | 0 |
3462 | { | - |
3463 | *class_uchardata++ = 1; | - |
3464 | class_uchardata += _pcre16_ord2utf(othercase, class_uchardata); | - |
3465 | } | 0 |
3466 | } | 0 |
3467 | | - |
3468 | | - |
3469 | } | 0 |
3470 | else | - |
3471 | | - |
3472 | | - |
3473 | | - |
3474 | { | - |
3475 | class_has_8bitchar = 1; | - |
3476 | classbits[c/8] |= (1 << (c&7)); | - |
3477 | if ((options & 0x00000001) != 0) partially evaluated: (options & 0x00000001) != 0 no Evaluation Count:0 | yes Evaluation Count:90 |
| 0-90 |
3478 | { | - |
3479 | c = cd->fcc[c]; | - |
3480 | classbits[c/8] |= (1 << (c&7)); | - |
3481 | } | 0 |
3482 | } executed: } Execution Count:90 | 90 |
3483 | } | - |
3484 | | - |
3485 | | - |
3486 | | - |
3487 | | - |
3488 | | - |
3489 | while (((c = *(++ptr)) != 0 || partially evaluated: (c = *(++ptr)) != 0 yes Evaluation Count:104 | no Evaluation Count:0 |
| 0-104 |
3490 | (nestptr != ((void *)0) && never evaluated: nestptr != ((void *)0) | 0 |
3491 | (ptr = nestptr, nestptr = ((void *)0), c = *(++ptr)) != 0)) && never evaluated: (ptr = nestptr, nestptr = ((void *)0), c = *(++ptr)) != 0 | 0 |
3492 | (c != '\135' || inescq)); evaluated: c != '\135' yes Evaluation Count:54 | yes Evaluation Count:50 |
partially evaluated: inescq no Evaluation Count:0 | yes Evaluation Count:50 |
| 0-54 |
3493 | | - |
3494 | | - |
3495 | | - |
3496 | if (c == 0) partially evaluated: c == 0 no Evaluation Count:0 | yes Evaluation Count:50 |
| 0-50 |
3497 | { | - |
3498 | *errorcodeptr = ERR6; | - |
3499 | goto FAILED; never executed: goto FAILED; | 0 |
3500 | } | - |
3501 | | - |
3502 | | - |
3503 | | - |
3504 | | - |
3505 | | - |
3506 | if (firstchar == (-2)) firstchar = (-1); evaluated: firstchar == (-2) yes Evaluation Count:36 | yes Evaluation Count:14 |
executed: firstchar = (-1); Execution Count:36 | 14-36 |
3507 | zerofirstchar = firstchar; | - |
3508 | zeroreqchar = reqchar; | - |
3509 | if (xclass && (!should_flip_negation || (options & 0x20000000) != 0)) evaluated: xclass yes Evaluation Count:4 | yes Evaluation Count:46 |
partially evaluated: !should_flip_negation yes Evaluation Count:4 | no Evaluation Count:0 |
never evaluated: (options & 0x20000000) != 0 | 0-46 |
3510 | | - |
3511 | | - |
3512 | | - |
3513 | | - |
3514 | { | - |
3515 | *class_uchardata++ = 0; | - |
3516 | *code++ = OP_XCLASS; | - |
3517 | code += 1; | - |
3518 | *code = negate_class? 0x01:0; partially evaluated: negate_class no Evaluation Count:0 | yes Evaluation Count:4 |
| 0-4 |
3519 | | - |
3520 | | - |
3521 | | - |
3522 | | - |
3523 | if (class_has_8bitchar > 0) partially evaluated: class_has_8bitchar > 0 no Evaluation Count:0 | yes Evaluation Count:4 |
| 0-4 |
3524 | { | - |
3525 | *code++ |= 0x02; | - |
3526 | memmove(code + (32 / sizeof(pcre_uchar)), code, | - |
3527 | ((class_uchardata - code) << 1)); | - |
3528 | memcpy(code, classbits, 32); | - |
3529 | code = class_uchardata + (32 / sizeof(pcre_uchar)); | - |
3530 | } | 0 |
3531 | else code = class_uchardata; executed: code = class_uchardata; Execution Count:4 | 4 |
3532 | | - |
3533 | | - |
3534 | | - |
3535 | (previous[1] = ((int)(code - previous))); | - |
3536 | break; executed: break; Execution Count:4 | 4 |
3537 | } | - |
3538 | *code++ = (negate_class == should_flip_negation) ? OP_CLASS : OP_NCLASS; partially evaluated: (negate_class == should_flip_negation) yes Evaluation Count:46 | no Evaluation Count:0 |
| 0-46 |
3539 | if (lengthptr == ((void *)0)) evaluated: lengthptr == ((void *)0) yes Evaluation Count:23 | yes Evaluation Count:23 |
| 23 |
3540 | { | - |
3541 | if (negate_class) partially evaluated: negate_class no Evaluation Count:0 | yes Evaluation Count:23 |
| 0-23 |
3542 | for (c = 0; c < 32; c++) classbits[c] = ~classbits[c]; never executed: classbits[c] = ~classbits[c]; | 0 |
3543 | memcpy(code, classbits, 32); | - |
3544 | } executed: } Execution Count:23 | 23 |
3545 | code += 32 / sizeof(pcre_uchar); | - |
3546 | NOT_CHAR: | - |
3547 | break; executed: break; Execution Count:48 | 48 |
3548 | | - |
3549 | | - |
3550 | | - |
3551 | | - |
3552 | | - |
3553 | | - |
3554 | case '\173': | - |
3555 | if (!is_quantifier) goto NORMAL_CHAR; evaluated: !is_quantifier yes Evaluation Count:2 | yes Evaluation Count:24 |
executed: goto NORMAL_CHAR; Execution Count:2 | 2-24 |
3556 | ptr = read_repeat_counts(ptr+1, &repeat_min, &repeat_max, errorcodeptr); | - |
3557 | if (*errorcodeptr != 0) goto FAILED; partially evaluated: *errorcodeptr != 0 no Evaluation Count:0 | yes Evaluation Count:24 |
never executed: goto FAILED; | 0-24 |
3558 | goto REPEAT; executed: goto REPEAT; Execution Count:24 | 24 |
3559 | | - |
3560 | case '\052': | - |
3561 | repeat_min = 0; | - |
3562 | repeat_max = -1; | - |
3563 | goto REPEAT; executed: goto REPEAT; Execution Count:247 | 247 |
3564 | | - |
3565 | case '\053': | - |
3566 | repeat_min = 1; | - |
3567 | repeat_max = -1; | - |
3568 | goto REPEAT; executed: goto REPEAT; Execution Count:120 | 120 |
3569 | | - |
3570 | case '\077': | - |
3571 | repeat_min = 0; | - |
3572 | repeat_max = 1; | - |
3573 | | - |
3574 | REPEAT: code before this statement executed: REPEAT: Execution Count:100 | 100 |
3575 | if (previous == ((void *)0)) partially evaluated: previous == ((void *)0) no Evaluation Count:0 | yes Evaluation Count:491 |
| 0-491 |
3576 | { | - |
3577 | *errorcodeptr = ERR9; | - |
3578 | goto FAILED; never executed: goto FAILED; | 0 |
3579 | } | - |
3580 | | - |
3581 | if (repeat_min == 0) evaluated: repeat_min == 0 yes Evaluation Count:347 | yes Evaluation Count:144 |
| 144-347 |
3582 | { | - |
3583 | firstchar = zerofirstchar; | - |
3584 | reqchar = zeroreqchar; | - |
3585 | } executed: } Execution Count:347 | 347 |
3586 | | - |
3587 | | - |
3588 | | - |
3589 | reqvary = (repeat_min == repeat_max)? 0 : 0x20000000l; evaluated: (repeat_min == repeat_max) yes Evaluation Count:16 | yes Evaluation Count:475 |
| 16-475 |
3590 | | - |
3591 | op_type = 0; | - |
3592 | possessive_quantifier = 0; | - |
3593 | | - |
3594 | | - |
3595 | | - |
3596 | | - |
3597 | tempcode = previous; | - |
3598 | | - |
3599 | | - |
3600 | | - |
3601 | | - |
3602 | | - |
3603 | | - |
3604 | | - |
3605 | if (ptr[1] == '\053') partially evaluated: ptr[1] == '\053' no Evaluation Count:0 | yes Evaluation Count:491 |
| 0-491 |
3606 | { | - |
3607 | repeat_type = 0; | - |
3608 | possessive_quantifier = 1; | - |
3609 | ptr++; | - |
3610 | } | 0 |
3611 | else if (ptr[1] == '\077') evaluated: ptr[1] == '\077' yes Evaluation Count:10 | yes Evaluation Count:481 |
| 10-481 |
3612 | { | - |
3613 | repeat_type = greedy_non_default; | - |
3614 | ptr++; | - |
3615 | } executed: } Execution Count:10 | 10 |
3616 | else repeat_type = greedy_default; executed: repeat_type = greedy_default; Execution Count:481 | 481 |
3617 | | - |
3618 | | - |
3619 | | - |
3620 | | - |
3621 | | - |
3622 | | - |
3623 | | - |
3624 | if (*previous == OP_RECURSE) partially evaluated: *previous == OP_RECURSE no Evaluation Count:0 | yes Evaluation Count:491 |
| 0-491 |
3625 | { | - |
3626 | memmove(previous + 1 + 1, previous, ((1 + 1) << 1)); | - |
3627 | *previous = OP_ONCE; | - |
3628 | (previous[1] = (2 + 2*1)); | - |
3629 | previous[2 + 2*1] = OP_KET; | - |
3630 | (previous[3 + 2*1] = (2 + 2*1)); | - |
3631 | code += 2 + 2 * 1; | - |
3632 | length_prevgroup = 3 + 3*1; | - |
3633 | | - |
3634 | | - |
3635 | | - |
3636 | | - |
3637 | if (lengthptr == ((void *)0) && cd->hwm >= cd->start_workspace + 1) never evaluated: lengthptr == ((void *)0) never evaluated: cd->hwm >= cd->start_workspace + 1 | 0 |
3638 | { | - |
3639 | int offset = (cd->hwm[-1]); | - |
3640 | if (offset == previous + 1 - cd->start_code) never evaluated: offset == previous + 1 - cd->start_code | 0 |
3641 | (cd->hwm[-1] = (offset + 1 + 1)); never executed: (cd->hwm[-1] = (offset + 1 + 1)); | 0 |
3642 | } | 0 |
3643 | } | 0 |
3644 | if (*previous == OP_CHAR || *previous == OP_CHARI) evaluated: *previous == OP_CHAR yes Evaluation Count:14 | yes Evaluation Count:477 |
partially evaluated: *previous == OP_CHARI no Evaluation Count:0 | yes Evaluation Count:477 |
| 0-477 |
3645 | { | - |
3646 | op_type = (*previous == OP_CHAR)? 0 : OP_STARI - OP_STAR; partially evaluated: (*previous == OP_CHAR) yes Evaluation Count:14 | no Evaluation Count:0 |
| 0-14 |
3647 | | - |
3648 | | - |
3649 | | - |
3650 | | - |
3651 | | - |
3652 | | - |
3653 | | - |
3654 | if (utf && (((code[-1]) & 0xfc00) == 0xdc00)) partially evaluated: utf yes Evaluation Count:14 | no Evaluation Count:0 |
partially evaluated: (((code[-1]) & 0xfc00) == 0xdc00) no Evaluation Count:0 | yes Evaluation Count:14 |
| 0-14 |
3655 | { | - |
3656 | pcre_uchar *lastchar = code - 1; | - |
3657 | if ((*lastchar & 0xfc00) == 0xdc00) lastchar--; never evaluated: (*lastchar & 0xfc00) == 0xdc00 never executed: lastchar--; | 0 |
3658 | c = (int)(code - lastchar); | - |
3659 | memcpy(utf_chars, lastchar, ((c) << 1)); | - |
3660 | c |= 0x10000000l; | - |
3661 | } | 0 |
3662 | else | - |
3663 | | - |
3664 | | - |
3665 | | - |
3666 | | - |
3667 | { | - |
3668 | c = code[-1]; | - |
3669 | if (repeat_min > 1) reqchar = c | req_caseopt | cd->req_varyopt; partially evaluated: repeat_min > 1 no Evaluation Count:0 | yes Evaluation Count:14 |
never executed: reqchar = c | req_caseopt | cd->req_varyopt; | 0-14 |
3670 | } executed: } Execution Count:14 | 14 |
3671 | | - |
3672 | | - |
3673 | | - |
3674 | | - |
3675 | | - |
3676 | | - |
3677 | if (!possessive_quantifier && partially evaluated: !possessive_quantifier yes Evaluation Count:14 | no Evaluation Count:0 |
| 0-14 |
3678 | repeat_max < 0 && partially evaluated: repeat_max < 0 yes Evaluation Count:14 | no Evaluation Count:0 |
| 0-14 |
3679 | check_auto_possessive(previous, utf, ptr + 1, options, cd)) partially evaluated: check_auto_possessive(previous, utf, ptr + 1, options, cd) no Evaluation Count:0 | yes Evaluation Count:14 |
| 0-14 |
3680 | { | - |
3681 | repeat_type = 0; | - |
3682 | possessive_quantifier = 1; | - |
3683 | } | 0 |
3684 | | - |
3685 | goto OUTPUT_SINGLE_REPEAT; executed: goto OUTPUT_SINGLE_REPEAT; Execution Count:14 | 14 |
3686 | } | - |
3687 | | - |
3688 | | - |
3689 | | - |
3690 | | - |
3691 | | - |
3692 | | - |
3693 | | - |
3694 | else if (*previous == OP_NOT || *previous == OP_NOTI) evaluated: *previous == OP_NOT yes Evaluation Count:2 | yes Evaluation Count:475 |
partially evaluated: *previous == OP_NOTI no Evaluation Count:0 | yes Evaluation Count:475 |
| 0-475 |
3695 | { | - |
3696 | op_type = ((*previous == OP_NOT)? OP_NOTSTAR : OP_NOTSTARI) - OP_STAR; partially evaluated: (*previous == OP_NOT) yes Evaluation Count:2 | no Evaluation Count:0 |
| 0-2 |
3697 | c = previous[1]; | - |
3698 | if (!possessive_quantifier && partially evaluated: !possessive_quantifier yes Evaluation Count:2 | no Evaluation Count:0 |
| 0-2 |
3699 | repeat_max < 0 && partially evaluated: repeat_max < 0 yes Evaluation Count:2 | no Evaluation Count:0 |
| 0-2 |
3700 | check_auto_possessive(previous, utf, ptr + 1, options, cd)) partially evaluated: check_auto_possessive(previous, utf, ptr + 1, options, cd) no Evaluation Count:0 | yes Evaluation Count:2 |
| 0-2 |
3701 | { | - |
3702 | repeat_type = 0; | - |
3703 | possessive_quantifier = 1; | - |
3704 | } | 0 |
3705 | goto OUTPUT_SINGLE_REPEAT; executed: goto OUTPUT_SINGLE_REPEAT; Execution Count:2 | 2 |
3706 | } | - |
3707 | else if (*previous < OP_EODN) evaluated: *previous < OP_EODN yes Evaluation Count:365 | yes Evaluation Count:110 |
| 110-365 |
3708 | { | - |
3709 | pcre_uchar *oldcode; | - |
3710 | int prop_type, prop_value; | - |
3711 | op_type = OP_TYPESTAR - OP_STAR; | - |
3712 | c = *previous; | - |
3713 | | - |
3714 | if (!possessive_quantifier && partially evaluated: !possessive_quantifier yes Evaluation Count:365 | no Evaluation Count:0 |
| 0-365 |
3715 | repeat_max < 0 && evaluated: repeat_max < 0 yes Evaluation Count:341 | yes Evaluation Count:24 |
| 24-341 |
3716 | check_auto_possessive(previous, utf, ptr + 1, options, cd)) evaluated: check_auto_possessive(previous, utf, ptr + 1, options, cd) yes Evaluation Count:10 | yes Evaluation Count:331 |
| 10-331 |
3717 | { | - |
3718 | repeat_type = 0; | - |
3719 | possessive_quantifier = 1; | - |
3720 | } executed: } Execution Count:10 | 10 |
3721 | | - |
3722 | OUTPUT_SINGLE_REPEAT: code before this statement executed: OUTPUT_SINGLE_REPEAT: Execution Count:365 | 365 |
3723 | if (*previous == OP_PROP || *previous == OP_NOTPROP) evaluated: *previous == OP_PROP yes Evaluation Count:4 | yes Evaluation Count:377 |
partially evaluated: *previous == OP_NOTPROP no Evaluation Count:0 | yes Evaluation Count:377 |
| 0-377 |
3724 | { | - |
3725 | prop_type = previous[1]; | - |
3726 | prop_value = previous[2]; | - |
3727 | } executed: } Execution Count:4 | 4 |
3728 | else prop_type = prop_value = -1; executed: prop_type = prop_value = -1; Execution Count:377 | 377 |
3729 | | - |
3730 | oldcode = code; | - |
3731 | code = previous; | - |
3732 | | - |
3733 | | - |
3734 | | - |
3735 | | - |
3736 | if (repeat_max == 0) goto END_REPEAT; partially evaluated: repeat_max == 0 no Evaluation Count:0 | yes Evaluation Count:381 |
never executed: goto END_REPEAT; | 0-381 |
3737 | repeat_type += op_type; | - |
3738 | | - |
3739 | | - |
3740 | | - |
3741 | | - |
3742 | if (repeat_min == 0) evaluated: repeat_min == 0 yes Evaluation Count:237 | yes Evaluation Count:144 |
| 144-237 |
3743 | { | - |
3744 | if (repeat_max == -1) *code++ = OP_STAR + repeat_type; partially evaluated: repeat_max == -1 yes Evaluation Count:237 | no Evaluation Count:0 |
executed: *code++ = OP_STAR + repeat_type; Execution Count:237 | 0-237 |
3745 | else if (repeat_max == 1) *code++ = OP_QUERY + repeat_type; never evaluated: repeat_max == 1 never executed: *code++ = OP_QUERY + repeat_type; | 0 |
3746 | else | - |
3747 | { | - |
3748 | *code++ = OP_UPTO + repeat_type; | - |
3749 | code[0] = repeat_max, code += 1; | - |
3750 | } | 0 |
3751 | } | - |
3752 | | - |
3753 | | - |
3754 | | - |
3755 | | - |
3756 | | - |
3757 | | - |
3758 | else if (repeat_min == 1) evaluated: repeat_min == 1 yes Evaluation Count:128 | yes Evaluation Count:16 |
| 16-128 |
3759 | { | - |
3760 | if (repeat_max == -1) evaluated: repeat_max == -1 yes Evaluation Count:120 | yes Evaluation Count:8 |
| 8-120 |
3761 | *code++ = OP_PLUS + repeat_type; executed: *code++ = OP_PLUS + repeat_type; Execution Count:120 | 120 |
3762 | else | - |
3763 | { | - |
3764 | code = oldcode; | - |
3765 | if (repeat_max == 1) goto END_REPEAT; partially evaluated: repeat_max == 1 no Evaluation Count:0 | yes Evaluation Count:8 |
never executed: goto END_REPEAT; | 0-8 |
3766 | *code++ = OP_UPTO + repeat_type; | - |
3767 | code[0] = repeat_max - 1, code += 1; | - |
3768 | } executed: } Execution Count:8 | 8 |
3769 | } | - |
3770 | | - |
3771 | | - |
3772 | | - |
3773 | | - |
3774 | else | - |
3775 | { | - |
3776 | *code++ = OP_EXACT + op_type; | - |
3777 | code[0] = repeat_min, code += 1; | - |
3778 | | - |
3779 | | - |
3780 | | - |
3781 | | - |
3782 | | - |
3783 | | - |
3784 | | - |
3785 | if (repeat_max < 0) partially evaluated: repeat_max < 0 no Evaluation Count:0 | yes Evaluation Count:16 |
| 0-16 |
3786 | { | - |
3787 | | - |
3788 | if (utf && (c & 0x10000000l) != 0) never evaluated: (c & 0x10000000l) != 0 | 0 |
3789 | { | - |
3790 | memcpy(code, utf_chars, ((c & 7) << 1)); | - |
3791 | code += c & 7; | - |
3792 | } | 0 |
3793 | else | - |
3794 | | - |
3795 | { | - |
3796 | *code++ = c; | - |
3797 | if (prop_type >= 0) never evaluated: prop_type >= 0 | 0 |
3798 | { | - |
3799 | *code++ = prop_type; | - |
3800 | *code++ = prop_value; | - |
3801 | } | 0 |
3802 | } | 0 |
3803 | *code++ = OP_STAR + repeat_type; | - |
3804 | } | 0 |
3805 | | - |
3806 | | - |
3807 | | - |
3808 | | - |
3809 | | - |
3810 | else if (repeat_max != repeat_min) partially evaluated: repeat_max != repeat_min no Evaluation Count:0 | yes Evaluation Count:16 |
| 0-16 |
3811 | { | - |
3812 | | - |
3813 | if (utf && (c & 0x10000000l) != 0) never evaluated: (c & 0x10000000l) != 0 | 0 |
3814 | { | - |
3815 | memcpy(code, utf_chars, ((c & 7) << 1)); | - |
3816 | code += c & 7; | - |
3817 | } | 0 |
3818 | else | - |
3819 | | - |
3820 | *code++ = c; never executed: *code++ = c; | 0 |
3821 | if (prop_type >= 0) never evaluated: prop_type >= 0 | 0 |
3822 | { | - |
3823 | *code++ = prop_type; | - |
3824 | *code++ = prop_value; | - |
3825 | } | 0 |
3826 | repeat_max -= repeat_min; | - |
3827 | | - |
3828 | if (repeat_max == 1) never evaluated: repeat_max == 1 | 0 |
3829 | { | - |
3830 | *code++ = OP_QUERY + repeat_type; | - |
3831 | } | 0 |
3832 | else | - |
3833 | { | - |
3834 | *code++ = OP_UPTO + repeat_type; | - |
3835 | code[0] = repeat_max, code += 1; | - |
3836 | } | 0 |
3837 | } | - |
3838 | } | - |
3839 | | - |
3840 | | - |
3841 | | - |
3842 | | - |
3843 | if (utf && (c & 0x10000000l) != 0) partially evaluated: utf yes Evaluation Count:381 | no Evaluation Count:0 |
partially evaluated: (c & 0x10000000l) != 0 no Evaluation Count:0 | yes Evaluation Count:381 |
| 0-381 |
3844 | { | - |
3845 | memcpy(code, utf_chars, ((c & 7) << 1)); | - |
3846 | code += c & 7; | - |
3847 | } | 0 |
3848 | else | - |
3849 | | - |
3850 | *code++ = c; executed: *code++ = c; Execution Count:381 | 381 |
3851 | | - |
3852 | | - |
3853 | | - |
3854 | | - |
3855 | | - |
3856 | if (prop_type >= 0) evaluated: prop_type >= 0 yes Evaluation Count:4 | yes Evaluation Count:377 |
| 4-377 |
3857 | { | - |
3858 | *code++ = prop_type; | - |
3859 | *code++ = prop_value; | - |
3860 | } executed: } Execution Count:4 | 4 |
3861 | | - |
3862 | } executed: } Execution Count:381 | 381 |
3863 | | - |
3864 | | - |
3865 | | - |
3866 | | - |
3867 | else if (*previous == OP_CLASS || partially evaluated: *previous == OP_CLASS no Evaluation Count:0 | yes Evaluation Count:110 |
| 0-110 |
3868 | *previous == OP_NCLASS || partially evaluated: *previous == OP_NCLASS no Evaluation Count:0 | yes Evaluation Count:110 |
| 0-110 |
3869 | | - |
3870 | *previous == OP_XCLASS || evaluated: *previous == OP_XCLASS yes Evaluation Count:4 | yes Evaluation Count:106 |
| 4-106 |
3871 | | - |
3872 | *previous == OP_REF || partially evaluated: *previous == OP_REF no Evaluation Count:0 | yes Evaluation Count:106 |
| 0-106 |
3873 | *previous == OP_REFI) partially evaluated: *previous == OP_REFI no Evaluation Count:0 | yes Evaluation Count:106 |
| 0-106 |
3874 | { | - |
3875 | if (repeat_max == 0) partially evaluated: repeat_max == 0 no Evaluation Count:0 | yes Evaluation Count:4 |
| 0-4 |
3876 | { | - |
3877 | code = previous; | - |
3878 | goto END_REPEAT; never executed: goto END_REPEAT; | 0 |
3879 | } | - |
3880 | if (repeat_min == 0 && repeat_max == -1) partially evaluated: repeat_min == 0 yes Evaluation Count:4 | no Evaluation Count:0 |
partially evaluated: repeat_max == -1 yes Evaluation Count:4 | no Evaluation Count:0 |
| 0-4 |
3881 | *code++ = OP_CRSTAR + repeat_type; executed: *code++ = OP_CRSTAR + repeat_type; Execution Count:4 | 4 |
3882 | else if (repeat_min == 1 && repeat_max == -1) never evaluated: repeat_min == 1 never evaluated: repeat_max == -1 | 0 |
3883 | *code++ = OP_CRPLUS + repeat_type; never executed: *code++ = OP_CRPLUS + repeat_type; | 0 |
3884 | else if (repeat_min == 0 && repeat_max == 1) never evaluated: repeat_min == 0 never evaluated: repeat_max == 1 | 0 |
3885 | *code++ = OP_CRQUERY + repeat_type; never executed: *code++ = OP_CRQUERY + repeat_type; | 0 |
3886 | else | - |
3887 | { | - |
3888 | *code++ = OP_CRRANGE + repeat_type; | - |
3889 | code[0] = repeat_min, code += 1; | - |
3890 | if (repeat_max == -1) repeat_max = 0; never evaluated: repeat_max == -1 never executed: repeat_max = 0; | 0 |
3891 | code[0] = repeat_max, code += 1; | - |
3892 | } | 0 |
3893 | } | - |
3894 | else if (*previous >= OP_ASSERT && *previous <= OP_COND) partially evaluated: *previous >= OP_ASSERT yes Evaluation Count:106 | no Evaluation Count:0 |
partially evaluated: *previous <= OP_COND yes Evaluation Count:106 | no Evaluation Count:0 |
| 0-106 |
3895 | { | - |
3896 | register int i; | - |
3897 | int len = (int)(code - previous); | - |
3898 | pcre_uchar *bralink = ((void *)0); | - |
3899 | pcre_uchar *brazeroptr = ((void *)0); | - |
3900 | | - |
3901 | | - |
3902 | | - |
3903 | | - |
3904 | if (*previous == OP_COND && previous[1 +1] == OP_DEF) partially evaluated: *previous == OP_COND no Evaluation Count:0 | yes Evaluation Count:106 |
never evaluated: previous[1 +1] == OP_DEF | 0-106 |
3905 | goto END_REPEAT; never executed: goto END_REPEAT; | 0 |
3906 | | - |
3907 | | - |
3908 | | - |
3909 | | - |
3910 | | - |
3911 | | - |
3912 | if (*previous < OP_ONCE) partially evaluated: *previous < OP_ONCE no Evaluation Count:0 | yes Evaluation Count:106 |
| 0-106 |
3913 | { | - |
3914 | if (repeat_min > 0) goto END_REPEAT; never evaluated: repeat_min > 0 never executed: goto END_REPEAT; | 0 |
3915 | if (repeat_max < 0 || repeat_max > 1) repeat_max = 1; never evaluated: repeat_max < 0 never evaluated: repeat_max > 1 never executed: repeat_max = 1; | 0 |
3916 | } | 0 |
3917 | if (repeat_min == 0) partially evaluated: repeat_min == 0 yes Evaluation Count:106 | no Evaluation Count:0 |
| 0-106 |
3918 | { | - |
3919 | if (repeat_max <= 1) partially evaluated: repeat_max <= 1 yes Evaluation Count:106 | no Evaluation Count:0 |
| 0-106 |
3920 | { | - |
3921 | *code = OP_END; | - |
3922 | adjust_recurse(previous, 1, utf, cd, save_hwm); | - |
3923 | memmove(previous + 1, previous, ((len) << 1)); | - |
3924 | code++; | - |
3925 | if (repeat_max == 0) partially evaluated: repeat_max == 0 no Evaluation Count:0 | yes Evaluation Count:106 |
| 0-106 |
3926 | { | - |
3927 | *previous++ = OP_SKIPZERO; | - |
3928 | goto END_REPEAT; never executed: goto END_REPEAT; | 0 |
3929 | } | - |
3930 | brazeroptr = previous; | - |
3931 | *previous++ = OP_BRAZERO + repeat_type; | - |
3932 | } executed: } Execution Count:106 | 106 |
3933 | else | - |
3934 | { | - |
3935 | int offset; | - |
3936 | *code = OP_END; | - |
3937 | adjust_recurse(previous, 2 + 1, utf, cd, save_hwm); | - |
3938 | memmove(previous + 2 + 1, previous, ((len) << 1)); | - |
3939 | code += 2 + 1; | - |
3940 | *previous++ = OP_BRAZERO + repeat_type; | - |
3941 | *previous++ = OP_BRA; | - |
3942 | | - |
3943 | | - |
3944 | | - |
3945 | | - |
3946 | offset = (bralink == ((void *)0))? 0 : (int)(previous - bralink); never evaluated: (bralink == ((void *)0)) | 0 |
3947 | bralink = previous; | - |
3948 | (previous[0] = (offset)), previous += 1; | - |
3949 | } | 0 |
3950 | | - |
3951 | repeat_max--; | - |
3952 | } executed: } Execution Count:106 | 106 |
3953 | else | - |
3954 | { | - |
3955 | if (repeat_min > 1) never evaluated: repeat_min > 1 | 0 |
3956 | { | - |
3957 | | - |
3958 | | - |
3959 | | - |
3960 | | - |
3961 | | - |
3962 | if (lengthptr != ((void *)0)) never evaluated: lengthptr != ((void *)0) | 0 |
3963 | { | - |
3964 | int delta = (repeat_min - 1)*length_prevgroup; | - |
3965 | if ((double)(repeat_min - 1)* | 0 |
3966 | (double)length_prevgroup > | 0 |
3967 | (double)2147483647 || never evaluated: (double)(repeat_min - 1)* (double)length_prevgroup > (double)2147483647 | 0 |
3968 | (2147483647 - 20) - *lengthptr < delta) never evaluated: (2147483647 - 20) - *lengthptr < delta | 0 |
3969 | { | - |
3970 | *errorcodeptr = ERR20; | - |
3971 | goto FAILED; never executed: goto FAILED; | 0 |
3972 | } | - |
3973 | *lengthptr += delta; | - |
3974 | } | 0 |
3975 | | - |
3976 | | - |
3977 | | - |
3978 | | - |
3979 | | - |
3980 | | - |
3981 | else | - |
3982 | { | - |
3983 | if (groupsetfirstchar && reqchar < 0) reqchar = firstchar; never evaluated: groupsetfirstchar never evaluated: reqchar < 0 never executed: reqchar = firstchar; | 0 |
3984 | | - |
3985 | for (i = 1; i < repeat_min; i++) never evaluated: i < repeat_min | 0 |
3986 | { | - |
3987 | pcre_uchar *hc; | - |
3988 | pcre_uchar *this_hwm = cd->hwm; | - |
3989 | memcpy(code, previous, ((len) << 1)); | - |
3990 | | - |
3991 | while (cd->hwm > cd->start_workspace + cd->workspace_size - | 0 |
3992 | (100) - (this_hwm - save_hwm)) never evaluated: cd->hwm > cd->start_workspace + cd->workspace_size - (100) - (this_hwm - save_hwm) | 0 |
3993 | { | - |
3994 | int save_offset = save_hwm - cd->start_workspace; | - |
3995 | int this_offset = this_hwm - cd->start_workspace; | - |
3996 | *errorcodeptr = expand_workspace(cd); | - |
3997 | if (*errorcodeptr != 0) goto FAILED; never evaluated: *errorcodeptr != 0 never executed: goto FAILED; | 0 |
3998 | save_hwm = (pcre_uchar *)cd->start_workspace + save_offset; | - |
3999 | this_hwm = (pcre_uchar *)cd->start_workspace + this_offset; | - |
4000 | } | 0 |
4001 | | - |
4002 | for (hc = save_hwm; hc < this_hwm; hc += 1) never evaluated: hc < this_hwm | 0 |
4003 | { | - |
4004 | (cd->hwm[0] = ((hc[0]) + len)); | - |
4005 | cd->hwm += 1; | - |
4006 | } | 0 |
4007 | save_hwm = this_hwm; | - |
4008 | code += len; | - |
4009 | } | 0 |
4010 | } | 0 |
4011 | } | - |
4012 | | - |
4013 | if (repeat_max > 0) repeat_max -= repeat_min; never evaluated: repeat_max > 0 never executed: repeat_max -= repeat_min; | 0 |
4014 | } | 0 |
4015 | if (repeat_max >= 0) evaluated: repeat_max >= 0 yes Evaluation Count:100 | yes Evaluation Count:6 |
| 6-100 |
4016 | { | - |
4017 | | - |
4018 | | - |
4019 | | - |
4020 | | - |
4021 | | - |
4022 | | - |
4023 | | - |
4024 | if (lengthptr != ((void *)0) && repeat_max > 0) evaluated: lengthptr != ((void *)0) yes Evaluation Count:50 | yes Evaluation Count:50 |
partially evaluated: repeat_max > 0 no Evaluation Count:0 | yes Evaluation Count:50 |
| 0-50 |
4025 | { | - |
4026 | int delta = repeat_max * (length_prevgroup + 1 + 2 + 2*1) - | - |
4027 | 2 - 2*1; | - |
4028 | if ((double)repeat_max * | 0 |
4029 | (double)(length_prevgroup + 1 + 2 + 2*1) | 0 |
4030 | > (double)2147483647 || never evaluated: (double)repeat_max * (double)(length_prevgroup + 1 + 2 + 2*1) > (double)2147483647 | 0 |
4031 | (2147483647 - 20) - *lengthptr < delta) never evaluated: (2147483647 - 20) - *lengthptr < delta | 0 |
4032 | { | - |
4033 | *errorcodeptr = ERR20; | - |
4034 | goto FAILED; never executed: goto FAILED; | 0 |
4035 | } | - |
4036 | *lengthptr += delta; | - |
4037 | } | 0 |
4038 | | - |
4039 | | - |
4040 | | - |
4041 | else for (i = repeat_max - 1; i >= 0; i--) partially evaluated: i >= 0 no Evaluation Count:0 | yes Evaluation Count:100 |
| 0-100 |
4042 | { | - |
4043 | pcre_uchar *hc; | - |
4044 | pcre_uchar *this_hwm = cd->hwm; | - |
4045 | | - |
4046 | *code++ = OP_BRAZERO + repeat_type; | - |
4047 | | - |
4048 | | - |
4049 | | - |
4050 | | - |
4051 | if (i != 0) | 0 |
4052 | { | - |
4053 | int offset; | - |
4054 | *code++ = OP_BRA; | - |
4055 | offset = (bralink == ((void *)0))? 0 : (int)(code - bralink); never evaluated: (bralink == ((void *)0)) | 0 |
4056 | bralink = code; | - |
4057 | (code[0] = (offset)), code += 1; | - |
4058 | } | 0 |
4059 | | - |
4060 | memcpy(code, previous, ((len) << 1)); | - |
4061 | | - |
4062 | | - |
4063 | | - |
4064 | | - |
4065 | while (cd->hwm > cd->start_workspace + cd->workspace_size - | 0 |
4066 | (100) - (this_hwm - save_hwm)) never evaluated: cd->hwm > cd->start_workspace + cd->workspace_size - (100) - (this_hwm - save_hwm) | 0 |
4067 | { | - |
4068 | int save_offset = save_hwm - cd->start_workspace; | - |
4069 | int this_offset = this_hwm - cd->start_workspace; | - |
4070 | *errorcodeptr = expand_workspace(cd); | - |
4071 | if (*errorcodeptr != 0) goto FAILED; never evaluated: *errorcodeptr != 0 never executed: goto FAILED; | 0 |
4072 | save_hwm = (pcre_uchar *)cd->start_workspace + save_offset; | - |
4073 | this_hwm = (pcre_uchar *)cd->start_workspace + this_offset; | - |
4074 | } | 0 |
4075 | | - |
4076 | for (hc = save_hwm; hc < this_hwm; hc += 1) never evaluated: hc < this_hwm | 0 |
4077 | { | - |
4078 | (cd->hwm[0] = ((hc[0]) + len + ((i != 0)? 2+1 : 1))); | - |
4079 | cd->hwm += 1; | - |
4080 | } | 0 |
4081 | save_hwm = this_hwm; | - |
4082 | code += len; | - |
4083 | } | 0 |
4084 | | - |
4085 | | - |
4086 | | - |
4087 | | - |
4088 | while (bralink != ((void *)0)) partially evaluated: bralink != ((void *)0) no Evaluation Count:0 | yes Evaluation Count:100 |
| 0-100 |
4089 | { | - |
4090 | int oldlinkoffset; | - |
4091 | int offset = (int)(code - bralink + 1); | - |
4092 | pcre_uchar *bra = code - offset; | - |
4093 | oldlinkoffset = (bra[1]); | - |
4094 | bralink = (oldlinkoffset == 0)? ((void *)0) : bralink - oldlinkoffset; never evaluated: (oldlinkoffset == 0) | 0 |
4095 | *code++ = OP_KET; | - |
4096 | (code[0] = (offset)), code += 1; | - |
4097 | (bra[1] = (offset)); | - |
4098 | } | 0 |
4099 | } executed: } Execution Count:100 | 100 |
4100 | else | - |
4101 | { | - |
4102 | pcre_uchar *ketcode = code - 1 - 1; | - |
4103 | pcre_uchar *bracode = ketcode - (ketcode[1]); | - |
4104 | | - |
4105 | | - |
4106 | | - |
4107 | if ((*bracode == OP_ONCE || *bracode == OP_ONCE_NC) && partially evaluated: *bracode == OP_ONCE no Evaluation Count:0 | yes Evaluation Count:6 |
partially evaluated: *bracode == OP_ONCE_NC no Evaluation Count:0 | yes Evaluation Count:6 |
| 0-6 |
4108 | possessive_quantifier) *bracode = OP_BRA; never evaluated: possessive_quantifier never executed: *bracode = OP_BRA; | 0 |
4109 | | - |
4110 | | - |
4111 | | - |
4112 | | - |
4113 | if (*bracode == OP_ONCE || *bracode == OP_ONCE_NC) partially evaluated: *bracode == OP_ONCE no Evaluation Count:0 | yes Evaluation Count:6 |
partially evaluated: *bracode == OP_ONCE_NC no Evaluation Count:0 | yes Evaluation Count:6 |
| 0-6 |
4114 | *ketcode = OP_KETRMAX + repeat_type; never executed: *ketcode = OP_KETRMAX + repeat_type; | 0 |
4115 | | - |
4116 | | - |
4117 | | - |
4118 | | - |
4119 | else | - |
4120 | { | - |
4121 | | - |
4122 | | - |
4123 | if (lengthptr == ((void *)0)) evaluated: lengthptr == ((void *)0) yes Evaluation Count:3 | yes Evaluation Count:3 |
| 3 |
4124 | { | - |
4125 | pcre_uchar *scode = bracode; | - |
4126 | do | - |
4127 | { | - |
4128 | if (could_be_empty_branch(scode, ketcode, utf, cd)) partially evaluated: could_be_empty_branch(scode, ketcode, utf, cd) no Evaluation Count:0 | yes Evaluation Count:3 |
| 0-3 |
4129 | { | - |
4130 | *bracode += OP_SBRA - OP_BRA; | - |
4131 | break; | 0 |
4132 | } | - |
4133 | scode += (scode[1]); | - |
4134 | } executed: } Execution Count:3 | 3 |
4135 | while (*scode == OP_ALT); partially evaluated: *scode == OP_ALT no Evaluation Count:0 | yes Evaluation Count:3 |
| 0-3 |
4136 | } executed: } Execution Count:3 | 3 |
4137 | | - |
4138 | | - |
4139 | | - |
4140 | if (possessive_quantifier) partially evaluated: possessive_quantifier no Evaluation Count:0 | yes Evaluation Count:6 |
| 0-6 |
4141 | { | - |
4142 | | - |
4143 | | - |
4144 | | - |
4145 | | - |
4146 | | - |
4147 | if (*bracode == OP_COND || *bracode == OP_SCOND) never evaluated: *bracode == OP_COND never evaluated: *bracode == OP_SCOND | 0 |
4148 | { | - |
4149 | int nlen = (int)(code - bracode); | - |
4150 | *code = OP_END; | - |
4151 | adjust_recurse(bracode, 1 + 1, utf, cd, save_hwm); | - |
4152 | memmove(bracode + 1 + 1, bracode, ((nlen) << 1)); | - |
4153 | code += 1 + 1; | - |
4154 | nlen += 1 + 1; | - |
4155 | *bracode = OP_BRAPOS; | - |
4156 | *code++ = OP_KETRPOS; | - |
4157 | (code[0] = (nlen)), code += 1; | - |
4158 | (bracode[1] = (nlen)); | - |
4159 | } | 0 |
4160 | | - |
4161 | | - |
4162 | | - |
4163 | else | - |
4164 | { | - |
4165 | *bracode += 1; | - |
4166 | *ketcode = OP_KETRPOS; | - |
4167 | } | 0 |
4168 | | - |
4169 | | - |
4170 | | - |
4171 | | - |
4172 | if (brazeroptr != ((void *)0)) *brazeroptr = OP_BRAPOSZERO; never evaluated: brazeroptr != ((void *)0) never executed: *brazeroptr = OP_BRAPOSZERO; | 0 |
4173 | if (repeat_min < 2) possessive_quantifier = 0; never evaluated: repeat_min < 2 never executed: possessive_quantifier = 0; | 0 |
4174 | } | 0 |
4175 | | - |
4176 | | - |
4177 | | - |
4178 | else *ketcode = OP_KETRMAX + repeat_type; executed: *ketcode = OP_KETRMAX + repeat_type; Execution Count:6 | 6 |
4179 | } | - |
4180 | } | - |
4181 | } | - |
4182 | | - |
4183 | | - |
4184 | | - |
4185 | | - |
4186 | | - |
4187 | | - |
4188 | else if (*previous == OP_FAIL) goto END_REPEAT; never evaluated: *previous == OP_FAIL never executed: goto END_REPEAT; | 0 |
4189 | | - |
4190 | | - |
4191 | | - |
4192 | else | - |
4193 | { | - |
4194 | *errorcodeptr = ERR11; | - |
4195 | goto FAILED; never executed: goto FAILED; | 0 |
4196 | } | - |
4197 | if (possessive_quantifier) evaluated: possessive_quantifier yes Evaluation Count:10 | yes Evaluation Count:481 |
| 10-481 |
4198 | { | - |
4199 | int len; | - |
4200 | | - |
4201 | if (*tempcode == OP_TYPEEXACT) partially evaluated: *tempcode == OP_TYPEEXACT no Evaluation Count:0 | yes Evaluation Count:10 |
| 0-10 |
4202 | tempcode += _pcre16_OP_lengths[*tempcode] + | 0 |
4203 | ((tempcode[1 + 1] == OP_PROP never evaluated: tempcode[1 + 1] == OP_PROP | 0 |
4204 | || tempcode[1 + 1] == OP_NOTPROP)? 2 : 0); never evaluated: tempcode[1 + 1] == OP_NOTPROP never executed: tempcode += _pcre16_OP_lengths[*tempcode] + ((tempcode[1 + 1] == OP_PROP || tempcode[1 + 1] == OP_NOTPROP)? 2 : 0); | 0 |
4205 | | - |
4206 | else if (*tempcode == OP_EXACT || *tempcode == OP_NOTEXACT) partially evaluated: *tempcode == OP_EXACT no Evaluation Count:0 | yes Evaluation Count:10 |
partially evaluated: *tempcode == OP_NOTEXACT no Evaluation Count:0 | yes Evaluation Count:10 |
| 0-10 |
4207 | { | - |
4208 | tempcode += _pcre16_OP_lengths[*tempcode]; | - |
4209 | | - |
4210 | if (utf && (((tempcode[-1]) & 0xfc00) == 0xd800)) never evaluated: (((tempcode[-1]) & 0xfc00) == 0xd800) | 0 |
4211 | tempcode += 1; never executed: tempcode += 1; | 0 |
4212 | | - |
4213 | } | 0 |
4214 | | - |
4215 | len = (int)(code - tempcode); | - |
4216 | if (len > 0) switch (*tempcode) partially evaluated: len > 0 yes Evaluation Count:10 | no Evaluation Count:0 |
| 0-10 |
4217 | { | - |
4218 | case OP_STAR: *tempcode = OP_POSSTAR; break; | 0 |
4219 | case OP_PLUS: *tempcode = OP_POSPLUS; break; | 0 |
4220 | case OP_QUERY: *tempcode = OP_POSQUERY; break; | 0 |
4221 | case OP_UPTO: *tempcode = OP_POSUPTO; break; | 0 |
4222 | | - |
4223 | case OP_STARI: *tempcode = OP_POSSTARI; break; | 0 |
4224 | case OP_PLUSI: *tempcode = OP_POSPLUSI; break; | 0 |
4225 | case OP_QUERYI: *tempcode = OP_POSQUERYI; break; | 0 |
4226 | case OP_UPTOI: *tempcode = OP_POSUPTOI; break; | 0 |
4227 | | - |
4228 | case OP_NOTSTAR: *tempcode = OP_NOTPOSSTAR; break; | 0 |
4229 | case OP_NOTPLUS: *tempcode = OP_NOTPOSPLUS; break; | 0 |
4230 | case OP_NOTQUERY: *tempcode = OP_NOTPOSQUERY; break; | 0 |
4231 | case OP_NOTUPTO: *tempcode = OP_NOTPOSUPTO; break; | 0 |
4232 | | - |
4233 | case OP_NOTSTARI: *tempcode = OP_NOTPOSSTARI; break; | 0 |
4234 | case OP_NOTPLUSI: *tempcode = OP_NOTPOSPLUSI; break; | 0 |
4235 | case OP_NOTQUERYI: *tempcode = OP_NOTPOSQUERYI; break; | 0 |
4236 | case OP_NOTUPTOI: *tempcode = OP_NOTPOSUPTOI; break; | 0 |
4237 | | - |
4238 | case OP_TYPESTAR: *tempcode = OP_TYPEPOSSTAR; break; executed: break; Execution Count:6 | 6 |
4239 | case OP_TYPEPLUS: *tempcode = OP_TYPEPOSPLUS; break; executed: break; Execution Count:4 | 4 |
4240 | case OP_TYPEQUERY: *tempcode = OP_TYPEPOSQUERY; break; | 0 |
4241 | case OP_TYPEUPTO: *tempcode = OP_TYPEPOSUPTO; break; | 0 |
4242 | | - |
4243 | | - |
4244 | | - |
4245 | | - |
4246 | default: | - |
4247 | *code = OP_END; | - |
4248 | adjust_recurse(tempcode, 1 + 1, utf, cd, save_hwm); | - |
4249 | memmove(tempcode + 1 + 1, tempcode, ((len) << 1)); | - |
4250 | code += 1 + 1; | - |
4251 | len += 1 + 1; | - |
4252 | tempcode[0] = OP_ONCE; | - |
4253 | *code++ = OP_KET; | - |
4254 | (code[0] = (len)), code += 1; | - |
4255 | (tempcode[1] = (len)); | - |
4256 | break; | 0 |
4257 | } | 0 |
4258 | } executed: } Execution Count:10 | 10 |
4259 | | - |
4260 | | - |
4261 | | - |
4262 | | - |
4263 | | - |
4264 | END_REPEAT: code before this statement executed: END_REPEAT: Execution Count:491 | 491 |
4265 | previous = ((void *)0); | - |
4266 | cd->req_varyopt |= reqvary; | - |
4267 | break; executed: break; Execution Count:491 | 491 |
4268 | | - |
4269 | | - |
4270 | | - |
4271 | | - |
4272 | | - |
4273 | | - |
4274 | | - |
4275 | case '\050': | - |
4276 | newoptions = options; | - |
4277 | skipbytes = 0; | - |
4278 | bravalue = OP_CBRA; | - |
4279 | save_hwm = cd->hwm; | - |
4280 | reset_bracount = 0; | - |
4281 | | - |
4282 | | - |
4283 | | - |
4284 | ptr++; | - |
4285 | if (ptr[0] == '\052' && (ptr[1] == ':' partially evaluated: ptr[0] == '\052' no Evaluation Count:0 | yes Evaluation Count:459 |
never evaluated: ptr[1] == ':' | 0-459 |
4286 | || (((ptr[1]) <= 255u) && ((cd->ctypes[ptr[1]] & 0x02) != 0)))) never evaluated: ((ptr[1]) <= 255u) never evaluated: ((cd->ctypes[ptr[1]] & 0x02) != 0) | 0 |
4287 | { | - |
4288 | int i, namelen; | - |
4289 | int arglen = 0; | - |
4290 | const char *vn = verbnames; | - |
4291 | const pcre_uchar *name = ptr + 1; | - |
4292 | const pcre_uchar *arg = ((void *)0); | - |
4293 | previous = ((void *)0); | - |
4294 | ptr++; | - |
4295 | while (((*ptr) <= 255u) && (cd->ctypes[*ptr] & 0x02) != 0) ptr++; never evaluated: ((*ptr) <= 255u) never evaluated: (cd->ctypes[*ptr] & 0x02) != 0 | 0 |
4296 | namelen = (int)(ptr - name); | - |
4297 | | - |
4298 | | - |
4299 | | - |
4300 | | - |
4301 | | - |
4302 | if (*ptr == '\072') never evaluated: *ptr == '\072' | 0 |
4303 | { | - |
4304 | arg = ++ptr; | - |
4305 | while (*ptr != 0 && *ptr != '\051') ptr++; never evaluated: *ptr != 0 never evaluated: *ptr != '\051' | 0 |
4306 | arglen = (int)(ptr - arg); | - |
4307 | } | 0 |
4308 | | - |
4309 | if (*ptr != '\051') never evaluated: *ptr != '\051' | 0 |
4310 | { | - |
4311 | *errorcodeptr = ERR60; | - |
4312 | goto FAILED; never executed: goto FAILED; | 0 |
4313 | } | - |
4314 | | - |
4315 | | - |
4316 | | - |
4317 | for (i = 0; i < verbcount; i++) never evaluated: i < verbcount | 0 |
4318 | { | - |
4319 | if (namelen == verbs[i].len && never evaluated: namelen == verbs[i].len | 0 |
4320 | _pcre16_strncmp_uc_c8((name), (vn), (namelen)) == 0) never evaluated: _pcre16_strncmp_uc_c8((name), (vn), (namelen)) == 0 | 0 |
4321 | { | - |
4322 | | - |
4323 | | - |
4324 | | - |
4325 | if (verbs[i].op == OP_ACCEPT) never evaluated: verbs[i].op == OP_ACCEPT | 0 |
4326 | { | - |
4327 | open_capitem *oc; | - |
4328 | if (arglen != 0) never evaluated: arglen != 0 | 0 |
4329 | { | - |
4330 | *errorcodeptr = ERR59; | - |
4331 | goto FAILED; never executed: goto FAILED; | 0 |
4332 | } | - |
4333 | cd->had_accept = 1; | - |
4334 | for (oc = cd->open_caps; oc != ((void *)0); oc = oc->next) never evaluated: oc != ((void *)0) | 0 |
4335 | { | - |
4336 | *code++ = OP_CLOSE; | - |
4337 | code[0] = oc->number, code += 1; | - |
4338 | } | 0 |
4339 | *code++ = (cd->assert_depth > 0)? OP_ASSERT_ACCEPT : OP_ACCEPT; never evaluated: (cd->assert_depth > 0) | 0 |
4340 | | - |
4341 | | - |
4342 | if (firstchar == (-2)) firstchar = (-1); never evaluated: firstchar == (-2) never executed: firstchar = (-1); | 0 |
4343 | } | 0 |
4344 | | - |
4345 | | - |
4346 | | - |
4347 | else if (arglen == 0) never evaluated: arglen == 0 | 0 |
4348 | { | - |
4349 | if (verbs[i].op < 0) never evaluated: verbs[i].op < 0 | 0 |
4350 | { | - |
4351 | *errorcodeptr = ERR66; | - |
4352 | goto FAILED; never executed: goto FAILED; | 0 |
4353 | } | - |
4354 | *code = verbs[i].op; | - |
4355 | if (*code++ == OP_THEN) cd->external_flags |= 0x1000; never evaluated: *code++ == OP_THEN never executed: cd->external_flags |= 0x1000; | 0 |
4356 | } | 0 |
4357 | | - |
4358 | else | - |
4359 | { | - |
4360 | if (verbs[i].op_arg < 0) never evaluated: verbs[i].op_arg < 0 | 0 |
4361 | { | - |
4362 | *errorcodeptr = ERR59; | - |
4363 | goto FAILED; never executed: goto FAILED; | 0 |
4364 | } | - |
4365 | *code = verbs[i].op_arg; | - |
4366 | if (*code++ == OP_THEN_ARG) cd->external_flags |= 0x1000; never evaluated: *code++ == OP_THEN_ARG never executed: cd->external_flags |= 0x1000; | 0 |
4367 | *code++ = arglen; | - |
4368 | memcpy(code, arg, ((arglen) << 1)); | - |
4369 | code += arglen; | - |
4370 | *code++ = 0; | - |
4371 | } | 0 |
4372 | | - |
4373 | break; | 0 |
4374 | } | - |
4375 | | - |
4376 | vn += verbs[i].len + 1; | - |
4377 | } | 0 |
4378 | | - |
4379 | if (i < verbcount) continue; never evaluated: i < verbcount never executed: continue; | 0 |
4380 | *errorcodeptr = ERR60; | - |
4381 | goto FAILED; never executed: goto FAILED; | 0 |
4382 | } | - |
4383 | | - |
4384 | | - |
4385 | | - |
4386 | | - |
4387 | else if (*ptr == '\077') evaluated: *ptr == '\077' yes Evaluation Count:103 | yes Evaluation Count:356 |
| 103-356 |
4388 | { | - |
4389 | int i, set, unset, namelen; | - |
4390 | int *optset; | - |
4391 | const pcre_uchar *name; | - |
4392 | pcre_uchar *slot; | - |
4393 | | - |
4394 | switch (*(++ptr)) | - |
4395 | { | - |
4396 | case '\043': | - |
4397 | ptr++; | - |
4398 | while (*ptr != 0 && *ptr != '\051') ptr++; never evaluated: *ptr != 0 never evaluated: *ptr != '\051' | 0 |
4399 | if (*ptr == 0) never evaluated: *ptr == 0 | 0 |
4400 | { | - |
4401 | *errorcodeptr = ERR18; | - |
4402 | goto FAILED; never executed: goto FAILED; | 0 |
4403 | } | - |
4404 | continue; never executed: continue; | 0 |
4405 | | - |
4406 | | - |
4407 | | - |
4408 | case '\174': | - |
4409 | reset_bracount = 1; | - |
4410 | | - |
4411 | | - |
4412 | | - |
4413 | case '\072': code before this statement executed: case '\072': Execution Count:8 | 8 |
4414 | bravalue = OP_BRA; | - |
4415 | ptr++; | - |
4416 | break; executed: break; Execution Count:52 | 52 |
4417 | | - |
4418 | | - |
4419 | | - |
4420 | case '\050': | - |
4421 | bravalue = OP_COND; | - |
4422 | if (ptr[1] == '\077' && (ptr[2] == '\075' || partially evaluated: ptr[1] == '\077' no Evaluation Count:0 | yes Evaluation Count:4 |
never evaluated: ptr[2] == '\075' | 0-4 |
4423 | ptr[2] == '\041' || ptr[2] == '\074')) never evaluated: ptr[2] == '\041' never evaluated: ptr[2] == '\074' | 0 |
4424 | break; | 0 |
4425 | | - |
4426 | | - |
4427 | | - |
4428 | | - |
4429 | code[1+1] = OP_CREF; | - |
4430 | skipbytes = 1+1; | - |
4431 | refsign = -1; | - |
4432 | | - |
4433 | | - |
4434 | | - |
4435 | if (ptr[1] == '\122' && ptr[2] == '\046') partially evaluated: ptr[1] == '\122' yes Evaluation Count:4 | no Evaluation Count:0 |
partially evaluated: ptr[2] == '\046' no Evaluation Count:0 | yes Evaluation Count:4 |
| 0-4 |
4436 | { | - |
4437 | terminator = -1; | - |
4438 | ptr += 2; | - |
4439 | code[1+1] = OP_RREF; | - |
4440 | } | 0 |
4441 | | - |
4442 | | - |
4443 | | - |
4444 | | - |
4445 | else if (ptr[1] == '\074') partially evaluated: ptr[1] == '\074' no Evaluation Count:0 | yes Evaluation Count:4 |
| 0-4 |
4446 | { | - |
4447 | terminator = '\076'; | - |
4448 | ptr++; | - |
4449 | } | 0 |
4450 | else if (ptr[1] == '\047') partially evaluated: ptr[1] == '\047' no Evaluation Count:0 | yes Evaluation Count:4 |
| 0-4 |
4451 | { | - |
4452 | terminator = '\047'; | - |
4453 | ptr++; | - |
4454 | } | 0 |
4455 | else | - |
4456 | { | - |
4457 | terminator = 0; | - |
4458 | if (ptr[1] == '\055' || ptr[1] == '\053') refsign = *(++ptr); partially evaluated: ptr[1] == '\055' no Evaluation Count:0 | yes Evaluation Count:4 |
partially evaluated: ptr[1] == '\053' no Evaluation Count:0 | yes Evaluation Count:4 |
never executed: refsign = *(++ptr); | 0-4 |
4459 | } executed: } Execution Count:4 | 4 |
4460 | | - |
4461 | | - |
4462 | | - |
4463 | if (!((ptr[1]) <= 255u) || (cd->ctypes[ptr[1]] & 0x10) == 0) partially evaluated: !((ptr[1]) <= 255u) no Evaluation Count:0 | yes Evaluation Count:4 |
partially evaluated: (cd->ctypes[ptr[1]] & 0x10) == 0 no Evaluation Count:0 | yes Evaluation Count:4 |
| 0-4 |
4464 | { | - |
4465 | ptr += 1; | - |
4466 | *errorcodeptr = ERR28; | - |
4467 | goto FAILED; never executed: goto FAILED; | 0 |
4468 | } | - |
4469 | | - |
4470 | | - |
4471 | | - |
4472 | recno = 0; | - |
4473 | name = ++ptr; | - |
4474 | while (((*ptr) <= 255u) && (cd->ctypes[*ptr] & 0x10) != 0) partially evaluated: ((*ptr) <= 255u) yes Evaluation Count:8 | no Evaluation Count:0 |
evaluated: (cd->ctypes[*ptr] & 0x10) != 0 yes Evaluation Count:4 | yes Evaluation Count:4 |
| 0-8 |
4475 | { | - |
4476 | if (recno >= 0) partially evaluated: recno >= 0 yes Evaluation Count:4 | no Evaluation Count:0 |
| 0-4 |
4477 | recno = (((*ptr) >= '\060' && (*ptr) <= '\071'))? recno * 10 + *ptr - '\060' : -1; partially evaluated: (*ptr) >= '\060' yes Evaluation Count:4 | no Evaluation Count:0 |
partially evaluated: (*ptr) <= '\071' no Evaluation Count:0 | yes Evaluation Count:4 |
executed: recno = (((*ptr) >= '\060' && (*ptr) <= '\071'))? recno * 10 + *ptr - '\060' : -1; Execution Count:4 | 0-4 |
4478 | ptr++; | - |
4479 | } executed: } Execution Count:4 | 4 |
4480 | namelen = (int)(ptr - name); | - |
4481 | | - |
4482 | if ((terminator > 0 && *ptr++ != terminator) || partially evaluated: terminator > 0 no Evaluation Count:0 | yes Evaluation Count:4 |
never evaluated: *ptr++ != terminator | 0-4 |
4483 | *ptr++ != '\051') partially evaluated: *ptr++ != '\051' no Evaluation Count:0 | yes Evaluation Count:4 |
| 0-4 |
4484 | { | - |
4485 | ptr--; | - |
4486 | *errorcodeptr = ERR26; | - |
4487 | goto FAILED; never executed: goto FAILED; | 0 |
4488 | } | - |
4489 | | - |
4490 | | - |
4491 | | - |
4492 | if (lengthptr != ((void *)0)) break; evaluated: lengthptr != ((void *)0) yes Evaluation Count:2 | yes Evaluation Count:2 |
executed: break; Execution Count:2 | 2 |
4493 | | - |
4494 | | - |
4495 | | - |
4496 | | - |
4497 | | - |
4498 | if (refsign > 0) partially evaluated: refsign > 0 no Evaluation Count:0 | yes Evaluation Count:2 |
| 0-2 |
4499 | { | - |
4500 | if (recno <= 0) never evaluated: recno <= 0 | 0 |
4501 | { | - |
4502 | *errorcodeptr = ERR58; | - |
4503 | goto FAILED; never executed: goto FAILED; | 0 |
4504 | } | - |
4505 | recno = (refsign == '\055')? never evaluated: (refsign == '\055') | 0 |
4506 | cd->bracount - recno + 1 : recno +cd->bracount; | - |
4507 | if (recno <= 0 || recno > cd->final_bracount) never evaluated: recno <= 0 never evaluated: recno > cd->final_bracount | 0 |
4508 | { | - |
4509 | *errorcodeptr = ERR15; | - |
4510 | goto FAILED; never executed: goto FAILED; | 0 |
4511 | } | - |
4512 | code[2+1] = recno; | - |
4513 | break; | 0 |
4514 | } | - |
4515 | | - |
4516 | | - |
4517 | | - |
4518 | | - |
4519 | | - |
4520 | | - |
4521 | | - |
4522 | slot = cd->name_table; | - |
4523 | for (i = 0; i < cd->names_found; i++) partially evaluated: i < cd->names_found no Evaluation Count:0 | yes Evaluation Count:2 |
| 0-2 |
4524 | { | - |
4525 | if (_pcre16_strncmp_uc_uc((name), (slot+1), (namelen)) == 0) break; never evaluated: _pcre16_strncmp_uc_uc((name), (slot+1), (namelen)) == 0 | 0 |
4526 | slot += cd->name_entry_size; | - |
4527 | } | 0 |
4528 | | - |
4529 | | - |
4530 | | - |
4531 | if (i < cd->names_found) partially evaluated: i < cd->names_found no Evaluation Count:0 | yes Evaluation Count:2 |
| 0-2 |
4532 | { | - |
4533 | recno = slot[0]; | - |
4534 | code[2+1] = recno; | - |
4535 | code[1+1]++; | - |
4536 | } | 0 |
4537 | | - |
4538 | | - |
4539 | | - |
4540 | else if ((i = find_parens(cd, name, namelen, | 0-2 |
4541 | (options & 0x00000008) != 0, utf)) > 0) partially evaluated: (i = find_parens(cd, name, namelen, (options & 0x00000008) != 0, utf)) > 0 no Evaluation Count:0 | yes Evaluation Count:2 |
| 0-2 |
4542 | { | - |
4543 | code[2+1] = i; | - |
4544 | code[1+1]++; | - |
4545 | } | 0 |
4546 | | - |
4547 | | - |
4548 | | - |
4549 | | - |
4550 | | - |
4551 | | - |
4552 | | - |
4553 | else if (terminator != 0) partially evaluated: terminator != 0 no Evaluation Count:0 | yes Evaluation Count:2 |
| 0-2 |
4554 | { | - |
4555 | *errorcodeptr = ERR15; | - |
4556 | goto FAILED; never executed: goto FAILED; | 0 |
4557 | } | - |
4558 | | - |
4559 | | - |
4560 | | - |
4561 | | - |
4562 | else if (*name == '\122') partially evaluated: *name == '\122' yes Evaluation Count:2 | no Evaluation Count:0 |
| 0-2 |
4563 | { | - |
4564 | recno = 0; | - |
4565 | for (i = 1; i < namelen; i++) partially evaluated: i < namelen no Evaluation Count:0 | yes Evaluation Count:2 |
| 0-2 |
4566 | { | - |
4567 | if (!((name[i]) >= '\060' && (name[i]) <= '\071')) never evaluated: (name[i]) >= '\060' never evaluated: (name[i]) <= '\071' | 0 |
4568 | { | - |
4569 | *errorcodeptr = ERR15; | - |
4570 | goto FAILED; never executed: goto FAILED; | 0 |
4571 | } | - |
4572 | recno = recno * 10 + name[i] - '\060'; | - |
4573 | } | 0 |
4574 | if (recno == 0) recno = 0xffff; partially evaluated: recno == 0 yes Evaluation Count:2 | no Evaluation Count:0 |
executed: recno = 0xffff; Execution Count:2 | 0-2 |
4575 | code[1+1] = OP_RREF; | - |
4576 | code[2+1] = recno; | - |
4577 | } executed: } Execution Count:2 | 2 |
4578 | | - |
4579 | | - |
4580 | | - |
4581 | | - |
4582 | else if (namelen == 6 && _pcre16_strncmp_uc_c8((name), ("\104" "\105" "\106" "\111" "\116" "\105"), (6)) == 0) never evaluated: namelen == 6 never evaluated: _pcre16_strncmp_uc_c8((name), ("\104" "\105" "\106" "\111" "\116" "\105"), (6)) == 0 | 0 |
4583 | { | - |
4584 | code[1+1] = OP_DEF; | - |
4585 | skipbytes = 1; | - |
4586 | } | 0 |
4587 | | - |
4588 | | - |
4589 | | - |
4590 | | - |
4591 | else if (recno > 0 && recno <= cd->final_bracount) never evaluated: recno > 0 never evaluated: recno <= cd->final_bracount | 0 |
4592 | { | - |
4593 | code[2+1] = recno; | - |
4594 | } | 0 |
4595 | | - |
4596 | | - |
4597 | | - |
4598 | else | - |
4599 | { | - |
4600 | *errorcodeptr = (recno == 0)? ERR35: ERR15; never evaluated: (recno == 0) | 0 |
4601 | goto FAILED; never executed: goto FAILED; | 0 |
4602 | } | - |
4603 | break; executed: break; Execution Count:2 | 2 |
4604 | | - |
4605 | | - |
4606 | | - |
4607 | case '\075': | - |
4608 | bravalue = OP_ASSERT; | - |
4609 | cd->assert_depth += 1; | - |
4610 | ptr++; | - |
4611 | break; | 0 |
4612 | | - |
4613 | | - |
4614 | | - |
4615 | case '\041': | - |
4616 | ptr++; | - |
4617 | if (*ptr == '\051') partially evaluated: *ptr == '\051' no Evaluation Count:0 | yes Evaluation Count:8 |
| 0-8 |
4618 | { | - |
4619 | *code++ = OP_FAIL; | - |
4620 | previous = ((void *)0); | - |
4621 | continue; never executed: continue; | 0 |
4622 | } | - |
4623 | bravalue = OP_ASSERT_NOT; | - |
4624 | cd->assert_depth += 1; | - |
4625 | break; executed: break; Execution Count:8 | 8 |
4626 | | - |
4627 | | - |
4628 | | - |
4629 | case '\074': | - |
4630 | switch (ptr[1]) | - |
4631 | { | - |
4632 | case '\075': | - |
4633 | bravalue = OP_ASSERTBACK; | - |
4634 | cd->assert_depth += 1; | - |
4635 | ptr += 2; | - |
4636 | break; | 0 |
4637 | | - |
4638 | case '\041': | - |
4639 | bravalue = OP_ASSERTBACK_NOT; | - |
4640 | cd->assert_depth += 1; | - |
4641 | ptr += 2; | - |
4642 | break; | 0 |
4643 | | - |
4644 | default: | - |
4645 | if (((ptr[1]) <= 255u) && (cd->ctypes[ptr[1]] & 0x10) != 0) partially evaluated: ((ptr[1]) <= 255u) yes Evaluation Count:31 | no Evaluation Count:0 |
partially evaluated: (cd->ctypes[ptr[1]] & 0x10) != 0 yes Evaluation Count:31 | no Evaluation Count:0 |
| 0-31 |
4646 | goto DEFINE_NAME; executed: goto DEFINE_NAME; Execution Count:31 | 31 |
4647 | ptr++; | - |
4648 | *errorcodeptr = ERR24; | - |
4649 | goto FAILED; never executed: goto FAILED; | 0 |
4650 | } | - |
4651 | break; | 0 |
4652 | | - |
4653 | | - |
4654 | | - |
4655 | case '\076': | - |
4656 | bravalue = OP_ONCE; | - |
4657 | ptr++; | - |
4658 | break; | 0 |
4659 | | - |
4660 | | - |
4661 | | - |
4662 | case '\103': | - |
4663 | previous_callout = code; | - |
4664 | after_manual_callout = 1; | - |
4665 | *code++ = OP_CALLOUT; | - |
4666 | { | - |
4667 | int n = 0; | - |
4668 | ptr++; | - |
4669 | while(((*ptr) >= '\060' && (*ptr) <= '\071')) never evaluated: (*ptr) >= '\060' never evaluated: (*ptr) <= '\071' | 0 |
4670 | n = n * 10 + *ptr++ - '\060'; never executed: n = n * 10 + *ptr++ - '\060'; | 0 |
4671 | if (*ptr != '\051') never evaluated: *ptr != '\051' | 0 |
4672 | { | - |
4673 | *errorcodeptr = ERR39; | - |
4674 | goto FAILED; never executed: goto FAILED; | 0 |
4675 | } | - |
4676 | if (n > 255) | 0 |
4677 | { | - |
4678 | *errorcodeptr = ERR38; | - |
4679 | goto FAILED; never executed: goto FAILED; | 0 |
4680 | } | - |
4681 | *code++ = n; | - |
4682 | (code[0] = ((int)(ptr - cd->start_pattern + 1))); | - |
4683 | (code[1] = (0)); | - |
4684 | code += 2 * 1; | - |
4685 | } | - |
4686 | previous = ((void *)0); | - |
4687 | continue; never executed: continue; | 0 |
4688 | | - |
4689 | | - |
4690 | | - |
4691 | case '\120': | - |
4692 | if (*(++ptr) == '\075' || never evaluated: *(++ptr) == '\075' | 0 |
4693 | *ptr == '\076') never evaluated: *ptr == '\076' | 0 |
4694 | { | - |
4695 | is_recurse = *ptr == '\076'; | - |
4696 | terminator = '\051'; | - |
4697 | goto NAMED_REF_OR_RECURSE; never executed: goto NAMED_REF_OR_RECURSE; | 0 |
4698 | } | - |
4699 | else if (*ptr != '\074') never evaluated: *ptr != '\074' | 0 |
4700 | { | - |
4701 | *errorcodeptr = ERR41; | - |
4702 | goto FAILED; never executed: goto FAILED; | 0 |
4703 | } | - |
4704 | | - |
4705 | | - |
4706 | | - |
4707 | | - |
4708 | DEFINE_NAME: code before this statement never executed: DEFINE_NAME: | 0 |
4709 | case '\047': | - |
4710 | { | - |
4711 | terminator = (*ptr == '\074')? partially evaluated: (*ptr == '\074') yes Evaluation Count:31 | no Evaluation Count:0 |
| 0-31 |
4712 | '\076' : '\047'; | - |
4713 | name = ++ptr; | - |
4714 | | - |
4715 | while (((*ptr) <= 255u) && (cd->ctypes[*ptr] & 0x10) != 0) ptr++; partially evaluated: ((*ptr) <= 255u) yes Evaluation Count:189 | no Evaluation Count:0 |
evaluated: (cd->ctypes[*ptr] & 0x10) != 0 yes Evaluation Count:158 | yes Evaluation Count:31 |
executed: ptr++; Execution Count:158 | 0-189 |
4716 | namelen = (int)(ptr - name); | - |
4717 | | - |
4718 | | - |
4719 | | - |
4720 | if (lengthptr != ((void *)0)) evaluated: lengthptr != ((void *)0) yes Evaluation Count:16 | yes Evaluation Count:15 |
| 15-16 |
4721 | { | - |
4722 | if (*ptr != terminator) evaluated: *ptr != terminator yes Evaluation Count:1 | yes Evaluation Count:15 |
| 1-15 |
4723 | { | - |
4724 | *errorcodeptr = ERR42; | - |
4725 | goto FAILED; executed: goto FAILED; Execution Count:1 | 1 |
4726 | } | - |
4727 | if (cd->names_found >= 10000) partially evaluated: cd->names_found >= 10000 no Evaluation Count:0 | yes Evaluation Count:15 |
| 0-15 |
4728 | { | - |
4729 | *errorcodeptr = ERR49; | - |
4730 | goto FAILED; never executed: goto FAILED; | 0 |
4731 | } | - |
4732 | if (namelen + 1 + 1 > cd->name_entry_size) evaluated: namelen + 1 + 1 > cd->name_entry_size yes Evaluation Count:10 | yes Evaluation Count:5 |
| 5-10 |
4733 | { | - |
4734 | cd->name_entry_size = namelen + 1 + 1; | - |
4735 | if (namelen > 32) partially evaluated: namelen > 32 no Evaluation Count:0 | yes Evaluation Count:10 |
| 0-10 |
4736 | { | - |
4737 | *errorcodeptr = ERR48; | - |
4738 | goto FAILED; never executed: goto FAILED; | 0 |
4739 | } | - |
4740 | } executed: } Execution Count:10 | 10 |
4741 | } executed: } Execution Count:15 | 15 |
4742 | else | - |
4743 | { | - |
4744 | BOOL dupname = 0; | - |
4745 | slot = cd->name_table; | - |
4746 | | - |
4747 | for (i = 0; i < cd->names_found; i++) evaluated: i < cd->names_found yes Evaluation Count:5 | yes Evaluation Count:14 |
| 5-14 |
4748 | { | - |
4749 | int crc = memcmp(name, slot+1, ((namelen) << 1)); | - |
4750 | if (crc == 0) partially evaluated: crc == 0 no Evaluation Count:0 | yes Evaluation Count:5 |
| 0-5 |
4751 | { | - |
4752 | if (slot[1 +namelen] == 0) never evaluated: slot[1 +namelen] == 0 | 0 |
4753 | { | - |
4754 | if (slot[0] != cd->bracount + 1 && never evaluated: slot[0] != cd->bracount + 1 | 0 |
4755 | (options & 0x00080000) == 0) never evaluated: (options & 0x00080000) == 0 | 0 |
4756 | { | - |
4757 | *errorcodeptr = ERR43; | - |
4758 | goto FAILED; never executed: goto FAILED; | 0 |
4759 | } | - |
4760 | else dupname = 1; never executed: dupname = 1; | 0 |
4761 | } | - |
4762 | else crc = -1; never executed: crc = -1; | 0 |
4763 | } | - |
4764 | | - |
4765 | | - |
4766 | | - |
4767 | | - |
4768 | | - |
4769 | | - |
4770 | if (crc < 0) evaluated: crc < 0 yes Evaluation Count:1 | yes Evaluation Count:4 |
| 1-4 |
4771 | { | - |
4772 | memmove(slot + cd->name_entry_size, slot, | - |
4773 | (((cd->names_found - i) * cd->name_entry_size) << 1)); | - |
4774 | break; executed: break; Execution Count:1 | 1 |
4775 | } | - |
4776 | | - |
4777 | | - |
4778 | | - |
4779 | slot += cd->name_entry_size; | - |
4780 | } executed: } Execution Count:4 | 4 |
4781 | | - |
4782 | | - |
4783 | | - |
4784 | | - |
4785 | if (!dupname) partially evaluated: !dupname yes Evaluation Count:15 | no Evaluation Count:0 |
| 0-15 |
4786 | { | - |
4787 | pcre_uchar *cslot = cd->name_table; | - |
4788 | for (i = 0; i < cd->names_found; i++) evaluated: i < cd->names_found yes Evaluation Count:6 | yes Evaluation Count:15 |
| 6-15 |
4789 | { | - |
4790 | if (cslot != slot) evaluated: cslot != slot yes Evaluation Count:5 | yes Evaluation Count:1 |
| 1-5 |
4791 | { | - |
4792 | if (cslot[0] == cd->bracount + 1) partially evaluated: cslot[0] == cd->bracount + 1 no Evaluation Count:0 | yes Evaluation Count:5 |
| 0-5 |
4793 | { | - |
4794 | *errorcodeptr = ERR65; | - |
4795 | goto FAILED; never executed: goto FAILED; | 0 |
4796 | } | - |
4797 | } executed: } Execution Count:5 | 5 |
4798 | else i--; executed: i--; Execution Count:1 | 1 |
4799 | cslot += cd->name_entry_size; | - |
4800 | } executed: } Execution Count:6 | 6 |
4801 | } executed: } Execution Count:15 | 15 |
4802 | | - |
4803 | slot[0] = cd->bracount + 1; | - |
4804 | memcpy(slot + 1, name, ((namelen) << 1)); | - |
4805 | slot[1 + namelen] = 0; | - |
4806 | } executed: } Execution Count:15 | 15 |
4807 | } | - |
4808 | | - |
4809 | | - |
4810 | | - |
4811 | | - |
4812 | cd->names_found++; | - |
4813 | ptr++; | - |
4814 | goto NUMBERED_GROUP; executed: goto NUMBERED_GROUP; Execution Count:30 | 30 |
4815 | | - |
4816 | | - |
4817 | | - |
4818 | case '\046': | - |
4819 | terminator = '\051'; | - |
4820 | is_recurse = 1; | - |
4821 | NAMED_REF_OR_RECURSE: code before this statement never executed: NAMED_REF_OR_RECURSE: | 0 |
4822 | name = ++ptr; | - |
4823 | while (((*ptr) <= 255u) && (cd->ctypes[*ptr] & 0x10) != 0) ptr++; never evaluated: ((*ptr) <= 255u) never evaluated: (cd->ctypes[*ptr] & 0x10) != 0 | 0 |
4824 | namelen = (int)(ptr - name); | - |
4825 | if (lengthptr != ((void *)0)) never evaluated: lengthptr != ((void *)0) | 0 |
4826 | { | - |
4827 | const pcre_uchar *temp; | - |
4828 | | - |
4829 | if (namelen == 0) never evaluated: namelen == 0 | 0 |
4830 | { | - |
4831 | *errorcodeptr = ERR62; | - |
4832 | goto FAILED; never executed: goto FAILED; | 0 |
4833 | } | - |
4834 | if (*ptr != terminator) never evaluated: *ptr != terminator | 0 |
4835 | { | - |
4836 | *errorcodeptr = ERR42; | - |
4837 | goto FAILED; never executed: goto FAILED; | 0 |
4838 | } | - |
4839 | if (namelen > 32) never evaluated: namelen > 32 | 0 |
4840 | { | - |
4841 | *errorcodeptr = ERR48; | - |
4842 | goto FAILED; never executed: goto FAILED; | 0 |
4843 | } | - |
4844 | temp = cd->end_pattern; | - |
4845 | cd->end_pattern = ptr; | - |
4846 | recno = find_parens(cd, name, namelen, | - |
4847 | (options & 0x00000008) != 0, utf); | - |
4848 | cd->end_pattern = temp; | - |
4849 | if (recno < 0) recno = 0; never evaluated: recno < 0 never executed: recno = 0; | 0 |
4850 | } | 0 |
4851 | | - |
4852 | | - |
4853 | | - |
4854 | | - |
4855 | | - |
4856 | | - |
4857 | else | - |
4858 | { | - |
4859 | slot = cd->name_table; | - |
4860 | for (i = 0; i < cd->names_found; i++) never evaluated: i < cd->names_found | 0 |
4861 | { | - |
4862 | if (_pcre16_strncmp_uc_uc((name), (slot+1), (namelen)) == 0 && never evaluated: _pcre16_strncmp_uc_uc((name), (slot+1), (namelen)) == 0 | 0 |
4863 | slot[1 +namelen] == 0) never evaluated: slot[1 +namelen] == 0 | 0 |
4864 | break; | 0 |
4865 | slot += cd->name_entry_size; | - |
4866 | } | 0 |
4867 | | - |
4868 | if (i < cd->names_found) never evaluated: i < cd->names_found | 0 |
4869 | { | - |
4870 | recno = slot[0]; | - |
4871 | } | 0 |
4872 | else if ((recno = | 0 |
4873 | find_parens(cd, name, namelen, | 0 |
4874 | (options & 0x00000008) != 0, utf)) <= 0) never evaluated: (recno = find_parens(cd, name, namelen, (options & 0x00000008) != 0, utf)) <= 0 | 0 |
4875 | { | - |
4876 | *errorcodeptr = ERR15; | - |
4877 | goto FAILED; never executed: goto FAILED; | 0 |
4878 | } | - |
4879 | } | - |
4880 | | - |
4881 | | - |
4882 | | - |
4883 | | - |
4884 | if (is_recurse) goto HANDLE_RECURSION; never evaluated: is_recurse never executed: goto HANDLE_RECURSION; | 0 |
4885 | else goto HANDLE_REFERENCE; never executed: goto HANDLE_REFERENCE; | 0 |
4886 | | - |
4887 | | - |
4888 | | - |
4889 | case '\122': | - |
4890 | ptr++; | - |
4891 | | - |
4892 | | - |
4893 | | - |
4894 | | - |
4895 | case '\055': case '\053': code before this statement executed: case '\055': Execution Count:4 | 4 |
4896 | case '\060': case '\061': case '\062': case '\063': case '\064': | - |
4897 | case '\065': case '\066': case '\067': case '\070': case '\071': | - |
4898 | { | - |
4899 | const pcre_uchar *called; | - |
4900 | terminator = '\051'; | - |
4901 | | - |
4902 | | - |
4903 | | - |
4904 | | - |
4905 | | - |
4906 | | - |
4907 | | - |
4908 | HANDLE_NUMERICAL_RECURSION: code before this statement executed: HANDLE_NUMERICAL_RECURSION: Execution Count:8 | 8 |
4909 | | - |
4910 | if ((refsign = *ptr) == '\053') partially evaluated: (refsign = *ptr) == '\053' no Evaluation Count:0 | yes Evaluation Count:8 |
| 0-8 |
4911 | { | - |
4912 | ptr++; | - |
4913 | if (!((*ptr) >= '\060' && (*ptr) <= '\071')) never evaluated: (*ptr) >= '\060' never evaluated: (*ptr) <= '\071' | 0 |
4914 | { | - |
4915 | *errorcodeptr = ERR63; | - |
4916 | goto FAILED; never executed: goto FAILED; | 0 |
4917 | } | - |
4918 | } | 0 |
4919 | else if (refsign == '\055') partially evaluated: refsign == '\055' no Evaluation Count:0 | yes Evaluation Count:8 |
| 0-8 |
4920 | { | - |
4921 | if (!((ptr[1]) >= '\060' && (ptr[1]) <= '\071')) never evaluated: (ptr[1]) >= '\060' never evaluated: (ptr[1]) <= '\071' | 0 |
4922 | goto OTHER_CHAR_AFTER_QUERY; never executed: goto OTHER_CHAR_AFTER_QUERY; | 0 |
4923 | ptr++; | - |
4924 | } | 0 |
4925 | | - |
4926 | recno = 0; | - |
4927 | while(((*ptr) >= '\060' && (*ptr) <= '\071')) evaluated: (*ptr) >= '\060' yes Evaluation Count:4 | yes Evaluation Count:8 |
partially evaluated: (*ptr) <= '\071' yes Evaluation Count:4 | no Evaluation Count:0 |
| 0-8 |
4928 | recno = recno * 10 + *ptr++ - '\060'; executed: recno = recno * 10 + *ptr++ - '\060'; Execution Count:4 | 4 |
4929 | | - |
4930 | if (*ptr != terminator) partially evaluated: *ptr != terminator no Evaluation Count:0 | yes Evaluation Count:8 |
| 0-8 |
4931 | { | - |
4932 | *errorcodeptr = ERR29; | - |
4933 | goto FAILED; never executed: goto FAILED; | 0 |
4934 | } | - |
4935 | | - |
4936 | if (refsign == '\055') partially evaluated: refsign == '\055' no Evaluation Count:0 | yes Evaluation Count:8 |
| 0-8 |
4937 | { | - |
4938 | if (recno == 0) never evaluated: recno == 0 | 0 |
4939 | { | - |
4940 | *errorcodeptr = ERR58; | - |
4941 | goto FAILED; never executed: goto FAILED; | 0 |
4942 | } | - |
4943 | recno = cd->bracount - recno + 1; | - |
4944 | if (recno <= 0) never evaluated: recno <= 0 | 0 |
4945 | { | - |
4946 | *errorcodeptr = ERR15; | - |
4947 | goto FAILED; never executed: goto FAILED; | 0 |
4948 | } | - |
4949 | } | 0 |
4950 | else if (refsign == '\053') partially evaluated: refsign == '\053' no Evaluation Count:0 | yes Evaluation Count:8 |
| 0-8 |
4951 | { | - |
4952 | if (recno == 0) never evaluated: recno == 0 | 0 |
4953 | { | - |
4954 | *errorcodeptr = ERR58; | - |
4955 | goto FAILED; never executed: goto FAILED; | 0 |
4956 | } | - |
4957 | recno += cd->bracount; | - |
4958 | } | 0 |
4959 | | - |
4960 | | - |
4961 | | - |
4962 | HANDLE_RECURSION: code before this statement executed: HANDLE_RECURSION: Execution Count:8 | 8 |
4963 | | - |
4964 | previous = code; | - |
4965 | called = cd->start_code; | - |
4966 | if (lengthptr == ((void *)0)) evaluated: lengthptr == ((void *)0) yes Evaluation Count:4 | yes Evaluation Count:4 |
| 4 |
4967 | { | - |
4968 | *code = OP_END; | - |
4969 | if (recno != 0) evaluated: recno != 0 yes Evaluation Count:2 | yes Evaluation Count:2 |
| 2 |
4970 | called = _pcre16_find_bracket(cd->start_code, utf, recno); executed: called = _pcre16_find_bracket(cd->start_code, utf, recno); Execution Count:2 | 2 |
4971 | | - |
4972 | | - |
4973 | | - |
4974 | if (called == ((void *)0)) evaluated: called == ((void *)0) yes Evaluation Count:2 | yes Evaluation Count:2 |
| 2 |
4975 | { | - |
4976 | if (find_parens(cd, ((void *)0), recno, | 0-2 |
4977 | (options & 0x00000008) != 0, utf) < 0) partially evaluated: find_parens(cd, ((void *)0), recno, (options & 0x00000008) != 0, utf) < 0 no Evaluation Count:0 | yes Evaluation Count:2 |
| 0-2 |
4978 | { | - |
4979 | *errorcodeptr = ERR15; | - |
4980 | goto FAILED; never executed: goto FAILED; | 0 |
4981 | } | - |
4982 | | - |
4983 | | - |
4984 | | - |
4985 | | - |
4986 | | - |
4987 | called = cd->start_code + recno; | - |
4988 | if (cd->hwm >= cd->start_workspace + cd->workspace_size - | 0-2 |
4989 | (100)) partially evaluated: cd->hwm >= cd->start_workspace + cd->workspace_size - (100) no Evaluation Count:0 | yes Evaluation Count:2 |
| 0-2 |
4990 | { | - |
4991 | *errorcodeptr = expand_workspace(cd); | - |
4992 | if (*errorcodeptr != 0) goto FAILED; never evaluated: *errorcodeptr != 0 never executed: goto FAILED; | 0 |
4993 | } | 0 |
4994 | (cd->hwm[0] = ((int)(code + 1 - cd->start_code))), cd->hwm += 1; | - |
4995 | } executed: } Execution Count:2 | 2 |
4996 | else if ((called[1]) == 0 && cond_depth <= 0 && partially evaluated: (called[1]) == 0 yes Evaluation Count:2 | no Evaluation Count:0 |
partially evaluated: cond_depth <= 0 no Evaluation Count:0 | yes Evaluation Count:2 |
| 0-2 |
4997 | could_be_empty(called, code, bcptr, utf, cd)) never evaluated: could_be_empty(called, code, bcptr, utf, cd) | 0 |
4998 | { | - |
4999 | *errorcodeptr = ERR40; | - |
5000 | goto FAILED; never executed: goto FAILED; | 0 |
5001 | } | - |
5002 | } | - |
5003 | | - |
5004 | | - |
5005 | | - |
5006 | | - |
5007 | | - |
5008 | *code = OP_RECURSE; | - |
5009 | (code[1] = ((int)(called - cd->start_code))); | - |
5010 | code += 1 + 1; | - |
5011 | groupsetfirstchar = 0; | - |
5012 | } | - |
5013 | | - |
5014 | | - |
5015 | | - |
5016 | if (firstchar == (-2)) firstchar = (-1); evaluated: firstchar == (-2) yes Evaluation Count:4 | yes Evaluation Count:4 |
executed: firstchar = (-1); Execution Count:4 | 4 |
5017 | continue; executed: continue; Execution Count:8 | 8 |
5018 | | - |
5019 | | - |
5020 | | - |
5021 | default: | - |
5022 | OTHER_CHAR_AFTER_QUERY: | - |
5023 | set = unset = 0; | - |
5024 | optset = &set; | - |
5025 | | - |
5026 | while (*ptr != '\051' && *ptr != '\072') never evaluated: *ptr != '\051' never evaluated: *ptr != '\072' | 0 |
5027 | { | - |
5028 | switch (*ptr++) | - |
5029 | { | - |
5030 | case '\055': optset = &unset; break; | 0 |
5031 | | - |
5032 | case '\112': | - |
5033 | *optset |= 0x00080000; | - |
5034 | cd->external_flags |= 0x0400; | - |
5035 | break; | 0 |
5036 | | - |
5037 | case '\151': *optset |= 0x00000001; break; | 0 |
5038 | case '\155': *optset |= 0x00000002; break; | 0 |
5039 | case '\163': *optset |= 0x00000004; break; | 0 |
5040 | case '\170': *optset |= 0x00000008; break; | 0 |
5041 | case '\125': *optset |= 0x00000200; break; | 0 |
5042 | case '\130': *optset |= 0x00000040; break; | 0 |
5043 | | - |
5044 | default: *errorcodeptr = ERR12; | - |
5045 | ptr--; | - |
5046 | goto FAILED; never executed: goto FAILED; | 0 |
5047 | } | - |
5048 | } | 0 |
5049 | | - |
5050 | | - |
5051 | | - |
5052 | newoptions = (options | set) & (~unset); | - |
5053 | if (*ptr == '\051') never evaluated: *ptr == '\051' | 0 |
5054 | { | - |
5055 | if (code == cd->start_code + 1 + 1 && never evaluated: code == cd->start_code + 1 + 1 | 0 |
5056 | (lengthptr == ((void *)0) || *lengthptr == 2 + 2*1)) never evaluated: lengthptr == ((void *)0) never evaluated: *lengthptr == 2 + 2*1 | 0 |
5057 | { | - |
5058 | cd->external_options = newoptions; | - |
5059 | } | 0 |
5060 | else | - |
5061 | { | - |
5062 | greedy_default = ((newoptions & 0x00000200) != 0); | - |
5063 | greedy_non_default = greedy_default ^ 1; | - |
5064 | req_caseopt = ((newoptions & 0x00000001) != 0)? 0x10000000l:0; never evaluated: ((newoptions & 0x00000001) != 0) | 0 |
5065 | } | 0 |
5066 | | - |
5067 | | - |
5068 | | - |
5069 | | - |
5070 | *optionsptr = options = newoptions; | - |
5071 | previous = ((void *)0); | - |
5072 | continue; never executed: continue; | 0 |
5073 | } | - |
5074 | | - |
5075 | | - |
5076 | | - |
5077 | | - |
5078 | | - |
5079 | | - |
5080 | bravalue = OP_BRA; | - |
5081 | ptr++; | - |
5082 | } | 0 |
5083 | } executed: } Execution Count:64 | 64 |
5084 | | - |
5085 | | - |
5086 | | - |
5087 | | - |
5088 | | - |
5089 | else if ((options & 0x00001000) != 0) evaluated: (options & 0x00001000) != 0 yes Evaluation Count:4 | yes Evaluation Count:352 |
| 4-352 |
5090 | { | - |
5091 | bravalue = OP_BRA; | - |
5092 | } executed: } Execution Count:4 | 4 |
5093 | | - |
5094 | | - |
5095 | | - |
5096 | else | - |
5097 | { | - |
5098 | NUMBERED_GROUP: | - |
5099 | cd->bracount += 1; | - |
5100 | code[1+1] = cd->bracount; | - |
5101 | skipbytes = 1; | - |
5102 | } executed: } Execution Count:382 | 382 |
5103 | | - |
5104 | | - |
5105 | | - |
5106 | | - |
5107 | | - |
5108 | | - |
5109 | previous = code; | - |
5110 | *code = bravalue; | - |
5111 | tempcode = code; | - |
5112 | tempreqvary = cd->req_varyopt; | - |
5113 | tempbracount = cd->bracount; | - |
5114 | length_prevgroup = 0; | - |
5115 | | - |
5116 | if (!compile_regex( | 0-450 |
5117 | newoptions, | 0-450 |
5118 | &tempcode, | 0-450 |
5119 | &ptr, | 0-450 |
5120 | errorcodeptr, | 0-450 |
5121 | (bravalue == OP_ASSERTBACK || | 0-450 |
5122 | bravalue == OP_ASSERTBACK_NOT), | 0-450 |
5123 | reset_bracount, | 0-450 |
5124 | skipbytes, | 0-450 |
5125 | cond_depth + | 0-450 |
5126 | ((bravalue == OP_COND)?1:0), | 0-450 |
5127 | &subfirstchar, | 0-450 |
5128 | &subreqchar, | 0-450 |
5129 | bcptr, | 0-450 |
5130 | cd, | 0-450 |
5131 | (lengthptr == ((void *)0))? ((void *)0) : | 0-450 |
5132 | &length_prevgroup | 0-450 |
5133 | )) partially evaluated: !compile_regex( newoptions, &tempcode, &ptr, errorcodeptr, (bravalue == OP_ASSERTBACK || bravalue == OP_ASSERTBACK_NOT), reset_bracount, skipbytes, cond_depth + ((bravalue == OP_COND)?1:0), &subfirstchar, &subreqchar, bcptr, cd, (lengthptr == ((void *)0))? ((void *)0) : &length_prevgroup ) no Evaluation Count:0 | yes Evaluation Count:450 |
| 0-450 |
5134 | goto FAILED; never executed: goto FAILED; | 0 |
5135 | | - |
5136 | | - |
5137 | | - |
5138 | | - |
5139 | if (bravalue == OP_ONCE && cd->bracount <= tempbracount) partially evaluated: bravalue == OP_ONCE no Evaluation Count:0 | yes Evaluation Count:450 |
never evaluated: cd->bracount <= tempbracount | 0-450 |
5140 | *code = OP_ONCE_NC; never executed: *code = OP_ONCE_NC; | 0 |
5141 | | - |
5142 | if (bravalue >= OP_ASSERT && bravalue <= OP_ASSERTBACK_NOT) partially evaluated: bravalue >= OP_ASSERT yes Evaluation Count:450 | no Evaluation Count:0 |
evaluated: bravalue <= OP_ASSERTBACK_NOT yes Evaluation Count:8 | yes Evaluation Count:442 |
| 0-450 |
5143 | cd->assert_depth -= 1; executed: cd->assert_depth -= 1; Execution Count:8 | 8 |
5144 | if (bravalue == OP_COND && lengthptr == ((void *)0)) evaluated: bravalue == OP_COND yes Evaluation Count:4 | yes Evaluation Count:446 |
evaluated: lengthptr == ((void *)0) yes Evaluation Count:2 | yes Evaluation Count:2 |
| 2-446 |
5145 | { | - |
5146 | pcre_uchar *tc = code; | - |
5147 | int condcount = 0; | - |
5148 | | - |
5149 | do { | - |
5150 | condcount++; | - |
5151 | tc += (tc[1]); | - |
5152 | } executed: } Execution Count:4 | 4 |
5153 | while (*tc != OP_KET); evaluated: *tc != OP_KET yes Evaluation Count:2 | yes Evaluation Count:2 |
| 2 |
5154 | | - |
5155 | | - |
5156 | | - |
5157 | | - |
5158 | if (code[1 +1] == OP_DEF) partially evaluated: code[1 +1] == OP_DEF no Evaluation Count:0 | yes Evaluation Count:2 |
| 0-2 |
5159 | { | - |
5160 | if (condcount > 1) never evaluated: condcount > 1 | 0 |
5161 | { | - |
5162 | *errorcodeptr = ERR54; | - |
5163 | goto FAILED; never executed: goto FAILED; | 0 |
5164 | } | - |
5165 | bravalue = OP_DEF; | - |
5166 | } | 0 |
5167 | | - |
5168 | | - |
5169 | | - |
5170 | | - |
5171 | | - |
5172 | else | - |
5173 | { | - |
5174 | if (condcount > 2) partially evaluated: condcount > 2 no Evaluation Count:0 | yes Evaluation Count:2 |
| 0-2 |
5175 | { | - |
5176 | *errorcodeptr = ERR27; | - |
5177 | goto FAILED; never executed: goto FAILED; | 0 |
5178 | } | - |
5179 | if (condcount == 1) subfirstchar = subreqchar = (-1); partially evaluated: condcount == 1 no Evaluation Count:0 | yes Evaluation Count:2 |
never executed: subfirstchar = subreqchar = (-1); | 0-2 |
5180 | } executed: } Execution Count:2 | 2 |
5181 | } | - |
5182 | | - |
5183 | | - |
5184 | | - |
5185 | if (*ptr != '\051') evaluated: *ptr != '\051' yes Evaluation Count:2 | yes Evaluation Count:448 |
| 2-448 |
5186 | { | - |
5187 | *errorcodeptr = ERR14; | - |
5188 | goto FAILED; executed: goto FAILED; Execution Count:2 | 2 |
5189 | } | - |
5190 | | - |
5191 | | - |
5192 | | - |
5193 | | - |
5194 | | - |
5195 | | - |
5196 | if (lengthptr != ((void *)0)) evaluated: lengthptr != ((void *)0) yes Evaluation Count:224 | yes Evaluation Count:224 |
| 224 |
5197 | { | - |
5198 | if ((2147483647 - 20) - *lengthptr < length_prevgroup - 2 - 2*1) partially evaluated: (2147483647 - 20) - *lengthptr < length_prevgroup - 2 - 2*1 no Evaluation Count:0 | yes Evaluation Count:224 |
| 0-224 |
5199 | { | - |
5200 | *errorcodeptr = ERR20; | - |
5201 | goto FAILED; never executed: goto FAILED; | 0 |
5202 | } | - |
5203 | *lengthptr += length_prevgroup - 2 - 2*1; | - |
5204 | code++; | - |
5205 | (code[0] = (1 + 1)), code += 1; | - |
5206 | *code++ = OP_KET; | - |
5207 | (code[0] = (1 + 1)), code += 1; | - |
5208 | break; executed: break; Execution Count:224 | 224 |
5209 | } | - |
5210 | | - |
5211 | | - |
5212 | | - |
5213 | code = tempcode; | - |
5214 | | - |
5215 | | - |
5216 | | - |
5217 | | - |
5218 | if (bravalue == OP_DEF) break; partially evaluated: bravalue == OP_DEF no Evaluation Count:0 | yes Evaluation Count:224 |
| 0-224 |
5219 | zeroreqchar = reqchar; | - |
5220 | zerofirstchar = firstchar; | - |
5221 | groupsetfirstchar = 0; | - |
5222 | | - |
5223 | if (bravalue >= OP_ONCE) evaluated: bravalue >= OP_ONCE yes Evaluation Count:220 | yes Evaluation Count:4 |
| 4-220 |
5224 | { | - |
5225 | | - |
5226 | | - |
5227 | | - |
5228 | | - |
5229 | | - |
5230 | | - |
5231 | if (firstchar == (-2)) evaluated: firstchar == (-2) yes Evaluation Count:104 | yes Evaluation Count:116 |
| 104-116 |
5232 | { | - |
5233 | if (subfirstchar >= 0) evaluated: subfirstchar >= 0 yes Evaluation Count:34 | yes Evaluation Count:70 |
| 34-70 |
5234 | { | - |
5235 | firstchar = subfirstchar; | - |
5236 | groupsetfirstchar = 1; | - |
5237 | } executed: } Execution Count:34 | 34 |
5238 | else firstchar = (-1); executed: firstchar = (-1); Execution Count:70 | 70 |
5239 | zerofirstchar = (-1); | - |
5240 | } executed: } Execution Count:104 | 104 |
5241 | | - |
5242 | | - |
5243 | | - |
5244 | | - |
5245 | | - |
5246 | else if (subfirstchar >= 0 && subreqchar < 0) evaluated: subfirstchar >= 0 yes Evaluation Count:85 | yes Evaluation Count:31 |
evaluated: subreqchar < 0 yes Evaluation Count:29 | yes Evaluation Count:56 |
| 29-85 |
5247 | subreqchar = subfirstchar | tempreqvary; executed: subreqchar = subfirstchar | tempreqvary; Execution Count:29 | 29 |
5248 | | - |
5249 | | - |
5250 | | - |
5251 | | - |
5252 | if (subreqchar >= 0) reqchar = subreqchar; evaluated: subreqchar >= 0 yes Evaluation Count:120 | yes Evaluation Count:100 |
executed: reqchar = subreqchar; Execution Count:120 | 100-120 |
5253 | } executed: } Execution Count:220 | 220 |
5254 | else if (bravalue == OP_ASSERT && subreqchar >= 0) reqchar = subreqchar; partially evaluated: bravalue == OP_ASSERT no Evaluation Count:0 | yes Evaluation Count:4 |
never evaluated: subreqchar >= 0 never executed: reqchar = subreqchar; | 0-4 |
5255 | break; executed: break; Execution Count:224 | 224 |
5256 | case '\134': | - |
5257 | tempptr = ptr; | - |
5258 | c = check_escape(&ptr, errorcodeptr, cd->bracount, options, 0); | - |
5259 | if (*errorcodeptr != 0) goto FAILED; evaluated: *errorcodeptr != 0 yes Evaluation Count:7 | yes Evaluation Count:851 |
executed: goto FAILED; Execution Count:7 | 7-851 |
5260 | | - |
5261 | if (c < 0) evaluated: c < 0 yes Evaluation Count:505 | yes Evaluation Count:346 |
| 346-505 |
5262 | { | - |
5263 | if (-c == ESC_Q) partially evaluated: -c == ESC_Q no Evaluation Count:0 | yes Evaluation Count:505 |
| 0-505 |
5264 | { | - |
5265 | if (ptr[1] == '\134' && ptr[2] == '\105') never evaluated: ptr[1] == '\134' never evaluated: ptr[2] == '\105' | 0 |
5266 | ptr += 2; never executed: ptr += 2; | 0 |
5267 | else inescq = 1; never executed: inescq = 1; | 0 |
5268 | continue; never executed: continue; | 0 |
5269 | } | - |
5270 | | - |
5271 | if (-c == ESC_E) continue; partially evaluated: -c == ESC_E no Evaluation Count:0 | yes Evaluation Count:505 |
never executed: continue; | 0-505 |
5272 | | - |
5273 | | - |
5274 | | - |
5275 | | - |
5276 | if (firstchar == (-2) && -c > ESC_b && -c < ESC_Z) evaluated: firstchar == (-2) yes Evaluation Count:244 | yes Evaluation Count:261 |
evaluated: -c > ESC_b yes Evaluation Count:140 | yes Evaluation Count:104 |
evaluated: -c < ESC_Z yes Evaluation Count:120 | yes Evaluation Count:20 |
| 20-261 |
5277 | firstchar = (-1); executed: firstchar = (-1); Execution Count:120 | 120 |
5278 | | - |
5279 | | - |
5280 | | - |
5281 | zerofirstchar = firstchar; | - |
5282 | zeroreqchar = reqchar; | - |
5283 | if (-c == ESC_g) partially evaluated: -c == ESC_g no Evaluation Count:0 | yes Evaluation Count:505 |
| 0-505 |
5284 | { | - |
5285 | const pcre_uchar *p; | - |
5286 | save_hwm = cd->hwm; | - |
5287 | terminator = (*(++ptr) == '\074')? never evaluated: (*(++ptr) == '\074') | 0 |
5288 | '\076' : '\047'; | - |
5289 | | - |
5290 | | - |
5291 | | - |
5292 | | - |
5293 | | - |
5294 | | - |
5295 | skipbytes = 0; | - |
5296 | reset_bracount = 0; | - |
5297 | | - |
5298 | | - |
5299 | | - |
5300 | if (ptr[1] != '\053' && ptr[1] != '\055') never evaluated: ptr[1] != '\053' never evaluated: ptr[1] != '\055' | 0 |
5301 | { | - |
5302 | BOOL is_a_number = 1; | - |
5303 | for (p = ptr + 1; *p != 0 && *p != terminator; p++) never evaluated: *p != terminator | 0 |
5304 | { | - |
5305 | if (!((*p) <= 255u)) { is_a_number = 0; break; } never evaluated: !((*p) <= 255u) | 0 |
5306 | if ((cd->ctypes[*p] & 0x04) == 0) is_a_number = 0; never evaluated: (cd->ctypes[*p] & 0x04) == 0 never executed: is_a_number = 0; | 0 |
5307 | if ((cd->ctypes[*p] & 0x10) == 0) break; never evaluated: (cd->ctypes[*p] & 0x10) == 0 | 0 |
5308 | } | 0 |
5309 | if (*p != terminator) never evaluated: *p != terminator | 0 |
5310 | { | - |
5311 | *errorcodeptr = ERR57; | - |
5312 | break; | 0 |
5313 | } | - |
5314 | if (is_a_number) never evaluated: is_a_number | 0 |
5315 | { | - |
5316 | ptr++; | - |
5317 | goto HANDLE_NUMERICAL_RECURSION; never executed: goto HANDLE_NUMERICAL_RECURSION; | 0 |
5318 | } | - |
5319 | is_recurse = 1; | - |
5320 | goto NAMED_REF_OR_RECURSE; never executed: goto NAMED_REF_OR_RECURSE; | 0 |
5321 | } | - |
5322 | | - |
5323 | | - |
5324 | | - |
5325 | p = ptr + 2; | - |
5326 | while (((*p) >= '\060' && (*p) <= '\071')) p++; never evaluated: (*p) >= '\060' never evaluated: (*p) <= '\071' | 0 |
5327 | if (*p != terminator) never evaluated: *p != terminator | 0 |
5328 | { | - |
5329 | *errorcodeptr = ERR57; | - |
5330 | break; | 0 |
5331 | } | - |
5332 | ptr++; | - |
5333 | goto HANDLE_NUMERICAL_RECURSION; never executed: goto HANDLE_NUMERICAL_RECURSION; | 0 |
5334 | } | - |
5335 | | - |
5336 | | - |
5337 | | - |
5338 | | - |
5339 | if (-c == ESC_k) partially evaluated: -c == ESC_k no Evaluation Count:0 | yes Evaluation Count:505 |
| 0-505 |
5340 | { | - |
5341 | if ((ptr[1] != '\074' && never evaluated: ptr[1] != '\074' | 0 |
5342 | ptr[1] != '\047' && ptr[1] != '\173')) never evaluated: ptr[1] != '\047' never evaluated: ptr[1] != '\173' | 0 |
5343 | { | - |
5344 | *errorcodeptr = ERR69; | - |
5345 | break; | 0 |
5346 | } | - |
5347 | is_recurse = 0; | - |
5348 | terminator = (*(++ptr) == '\074')? never evaluated: (*(++ptr) == '\074') | 0 |
5349 | '\076' : (*ptr == '\047')? | - |
5350 | '\047' : '\175'; | - |
5351 | goto NAMED_REF_OR_RECURSE; never executed: goto NAMED_REF_OR_RECURSE; | 0 |
5352 | } | - |
5353 | | - |
5354 | | - |
5355 | | - |
5356 | | - |
5357 | | - |
5358 | if (-c >= ESC_REF) partially evaluated: -c >= ESC_REF no Evaluation Count:0 | yes Evaluation Count:505 |
| 0-505 |
5359 | { | - |
5360 | open_capitem *oc; | - |
5361 | recno = -c - ESC_REF; | - |
5362 | | - |
5363 | HANDLE_REFERENCE: code before this statement never executed: HANDLE_REFERENCE: | 0 |
5364 | if (firstchar == (-2)) firstchar = (-1); never evaluated: firstchar == (-2) never executed: firstchar = (-1); | 0 |
5365 | previous = code; | - |
5366 | *code++ = ((options & 0x00000001) != 0)? OP_REFI : OP_REF; never evaluated: ((options & 0x00000001) != 0) | 0 |
5367 | code[0] = recno, code += 1; | - |
5368 | cd->backref_map |= (recno < 32)? (1 << recno) : 1; never evaluated: (recno < 32) | 0 |
5369 | if (recno > cd->top_backref) cd->top_backref = recno; never evaluated: recno > cd->top_backref never executed: cd->top_backref = recno; | 0 |
5370 | | - |
5371 | | - |
5372 | | - |
5373 | | - |
5374 | | - |
5375 | for (oc = cd->open_caps; oc != ((void *)0); oc = oc->next) never evaluated: oc != ((void *)0) | 0 |
5376 | { | - |
5377 | if (oc->number == recno) never evaluated: oc->number == recno | 0 |
5378 | { | - |
5379 | oc->flag = 1; | - |
5380 | break; | 0 |
5381 | } | - |
5382 | } | 0 |
5383 | } | 0 |
5384 | | - |
5385 | | - |
5386 | | - |
5387 | | - |
5388 | else if (-c == ESC_P || -c == ESC_p) evaluated: -c == ESC_P yes Evaluation Count:3 | yes Evaluation Count:502 |
evaluated: -c == ESC_p yes Evaluation Count:4 | yes Evaluation Count:498 |
| 3-502 |
5389 | { | - |
5390 | BOOL negated; | - |
5391 | int pdata; | - |
5392 | int ptype = get_ucp(&ptr, &negated, &pdata, errorcodeptr); | - |
5393 | if (ptype < 0) goto FAILED; evaluated: ptype < 0 yes Evaluation Count:1 | yes Evaluation Count:6 |
executed: goto FAILED; Execution Count:1 | 1-6 |
5394 | previous = code; | - |
5395 | *code++ = ((-c == ESC_p) != negated)? OP_PROP : OP_NOTPROP; evaluated: ((-c == ESC_p) != negated) yes Evaluation Count:4 | yes Evaluation Count:2 |
| 2-4 |
5396 | *code++ = ptype; | - |
5397 | *code++ = pdata; | - |
5398 | } executed: } Execution Count:6 | 6 |
5399 | else | - |
5400 | { | - |
5401 | | - |
5402 | if (-c >= ESC_DU && -c <= ESC_wu) evaluated: -c >= ESC_DU yes Evaluation Count:4 | yes Evaluation Count:494 |
partially evaluated: -c <= ESC_wu yes Evaluation Count:4 | no Evaluation Count:0 |
| 0-494 |
5403 | { | - |
5404 | nestptr = ptr + 1; | - |
5405 | ptr = substitutes[-c - ESC_DU] - 1; | - |
5406 | } executed: } Execution Count:4 | 4 |
5407 | else | - |
5408 | | - |
5409 | | - |
5410 | | - |
5411 | | - |
5412 | { | - |
5413 | previous = (-c > ESC_b && -c < ESC_Z)? code : ((void *)0); evaluated: -c > ESC_b yes Evaluation Count:196 | yes Evaluation Count:298 |
evaluated: -c < ESC_Z yes Evaluation Count:162 | yes Evaluation Count:34 |
| 34-298 |
5414 | *code++ = (!utf && c == -ESC_C)? OP_ALLANY : -c; partially evaluated: !utf no Evaluation Count:0 | yes Evaluation Count:494 |
never evaluated: c == -ESC_C | 0-494 |
5415 | } executed: } Execution Count:494 | 494 |
5416 | } | - |
5417 | continue; executed: continue; Execution Count:504 | 504 |
5418 | } | - |
5419 | | - |
5420 | | - |
5421 | | - |
5422 | | - |
5423 | | - |
5424 | | - |
5425 | if (utf && c > 65535) partially evaluated: utf yes Evaluation Count:346 | no Evaluation Count:0 |
evaluated: c > 65535 yes Evaluation Count:6 | yes Evaluation Count:340 |
| 0-346 |
5426 | mclength = _pcre16_ord2utf(c, mcbuffer); executed: mclength = _pcre16_ord2utf(c, mcbuffer); Execution Count:6 | 6 |
5427 | else | - |
5428 | | - |
5429 | | - |
5430 | { | - |
5431 | mcbuffer[0] = c; | - |
5432 | mclength = 1; | - |
5433 | } executed: } Execution Count:340 | 340 |
5434 | goto ONE_CHAR; executed: goto ONE_CHAR; Execution Count:346 | 346 |
5435 | | - |
5436 | | - |
5437 | | - |
5438 | | - |
5439 | | - |
5440 | | - |
5441 | | - |
5442 | default: | - |
5443 | NORMAL_CHAR: | - |
5444 | mclength = 1; | - |
5445 | mcbuffer[0] = c; | - |
5446 | | - |
5447 | | - |
5448 | if (utf && (((c) & 0xfc00) == 0xd800)) partially evaluated: utf yes Evaluation Count:18076 | no Evaluation Count:0 |
partially evaluated: (((c) & 0xfc00) == 0xd800) no Evaluation Count:0 | yes Evaluation Count:18076 |
| 0-18076 |
5449 | if ((1) && ((ptr[1]) & 0xfc00) == 0xdc00) mcbuffer[mclength++] = *(++ptr); never evaluated: ((ptr[1]) & 0xfc00) == 0xdc00 never executed: mcbuffer[mclength++] = *(++ptr); | 0 |
5450 | | - |
5451 | | - |
5452 | | - |
5453 | | - |
5454 | | - |
5455 | ONE_CHAR: code before this statement executed: ONE_CHAR: Execution Count:18076 | 18076 |
5456 | previous = code; | - |
5457 | *code++ = ((options & 0x00000001) != 0)? OP_CHARI : OP_CHAR; evaluated: ((options & 0x00000001) != 0) yes Evaluation Count:1138 | yes Evaluation Count:17290 |
| 1138-17290 |
5458 | for (c = 0; c < mclength; c++) *code++ = mcbuffer[c]; evaluated: c < mclength yes Evaluation Count:18434 | yes Evaluation Count:18428 |
executed: *code++ = mcbuffer[c]; Execution Count:18434 | 18428-18434 |
5459 | | - |
5460 | | - |
5461 | | - |
5462 | if (mcbuffer[0] == '\015' || mcbuffer[0] == '\012') partially evaluated: mcbuffer[0] == '\015' no Evaluation Count:0 | yes Evaluation Count:18428 |
partially evaluated: mcbuffer[0] == '\012' no Evaluation Count:0 | yes Evaluation Count:18428 |
| 0-18428 |
5463 | cd->external_flags |= 0x0800; never executed: cd->external_flags |= 0x0800; | 0 |
5464 | | - |
5465 | | - |
5466 | | - |
5467 | | - |
5468 | | - |
5469 | | - |
5470 | if (firstchar == (-2)) evaluated: firstchar == (-2) yes Evaluation Count:767 | yes Evaluation Count:17661 |
| 767-17661 |
5471 | { | - |
5472 | zerofirstchar = (-1); | - |
5473 | zeroreqchar = reqchar; | - |
5474 | | - |
5475 | | - |
5476 | | - |
5477 | | - |
5478 | if (mclength == 1 || req_caseopt == 0) partially evaluated: mclength == 1 yes Evaluation Count:767 | no Evaluation Count:0 |
never evaluated: req_caseopt == 0 | 0-767 |
5479 | { | - |
5480 | firstchar = mcbuffer[0] | req_caseopt; | - |
5481 | if (mclength != 1) reqchar = code[-1] | cd->req_varyopt; partially evaluated: mclength != 1 no Evaluation Count:0 | yes Evaluation Count:767 |
never executed: reqchar = code[-1] | cd->req_varyopt; | 0-767 |
5482 | } executed: } Execution Count:767 | 767 |
5483 | else firstchar = reqchar = (-1); never executed: firstchar = reqchar = (-1); | 0 |
5484 | } | - |
5485 | | - |
5486 | | - |
5487 | | - |
5488 | | - |
5489 | else | - |
5490 | { | - |
5491 | zerofirstchar = firstchar; | - |
5492 | zeroreqchar = reqchar; | - |
5493 | if (mclength == 1 || req_caseopt == 0) evaluated: mclength == 1 yes Evaluation Count:17655 | yes Evaluation Count:6 |
partially evaluated: req_caseopt == 0 yes Evaluation Count:6 | no Evaluation Count:0 |
| 0-17655 |
5494 | reqchar = code[-1] | req_caseopt | cd->req_varyopt; executed: reqchar = code[-1] | req_caseopt | cd->req_varyopt; Execution Count:17661 | 17661 |
5495 | } executed: } Execution Count:17661 | 17661 |
5496 | | - |
5497 | break; executed: break; Execution Count:18428 | 18428 |
5498 | } | - |
5499 | } executed: } Execution Count:19716 | 19716 |
5500 | | - |
5501 | | - |
5502 | | - |
5503 | | - |
5504 | | - |
5505 | | - |
5506 | FAILED: code before this statement never executed: FAILED: | 0 |
5507 | *ptrptr = ptr; | - |
5508 | return 0; executed: return 0; Execution Count:11 | 11 |
5509 | } | - |
5510 | static BOOL | - |
5511 | compile_regex(int options, pcre_uchar **codeptr, const pcre_uchar **ptrptr, | - |
5512 | int *errorcodeptr, BOOL lookbehind, BOOL reset_bracount, int skipbytes, | - |
5513 | int cond_depth, pcre_int32 *firstcharptr, pcre_int32 *reqcharptr, | - |
5514 | branch_chain *bcptr, compile_data *cd, int *lengthptr) | - |
5515 | { | - |
5516 | const pcre_uchar *ptr = *ptrptr; | - |
5517 | pcre_uchar *code = *codeptr; | - |
5518 | pcre_uchar *last_branch = code; | - |
5519 | pcre_uchar *start_bracket = code; | - |
5520 | pcre_uchar *reverse_count = ((void *)0); | - |
5521 | open_capitem capitem; | - |
5522 | int capnumber = 0; | - |
5523 | pcre_int32 firstchar, reqchar; | - |
5524 | pcre_int32 branchfirstchar, branchreqchar; | - |
5525 | int length; | - |
5526 | int orig_bracount; | - |
5527 | int max_bracount; | - |
5528 | branch_chain bc; | - |
5529 | | - |
5530 | bc.outer = bcptr; | - |
5531 | bc.current_branch = code; | - |
5532 | | - |
5533 | firstchar = reqchar = (-2); | - |
5534 | length = 2 + 2*1 + skipbytes; | - |
5535 | if (*code == OP_CBRA) evaluated: *code == OP_CBRA yes Evaluation Count:382 | yes Evaluation Count:793 |
| 382-793 |
5536 | { | - |
5537 | capnumber = code[1 + 1]; | - |
5538 | capitem.number = capnumber; | - |
5539 | capitem.next = cd->open_caps; | - |
5540 | capitem.flag = 0; | - |
5541 | cd->open_caps = &capitem; | - |
5542 | } executed: } Execution Count:382 | 382 |
5543 | | - |
5544 | | - |
5545 | | - |
5546 | (code[1] = (0)); | - |
5547 | code += 1 + 1 + skipbytes; | - |
5548 | | - |
5549 | | - |
5550 | | - |
5551 | orig_bracount = max_bracount = cd->bracount; | - |
5552 | for (;;) | - |
5553 | { | - |
5554 | | - |
5555 | | - |
5556 | | - |
5557 | if (reset_bracount) cd->bracount = orig_bracount; evaluated: reset_bracount yes Evaluation Count:16 | yes Evaluation Count:1198 |
executed: cd->bracount = orig_bracount; Execution Count:16 | 16-1198 |
5558 | | - |
5559 | | - |
5560 | | - |
5561 | if (lookbehind) partially evaluated: lookbehind no Evaluation Count:0 | yes Evaluation Count:1214 |
| 0-1214 |
5562 | { | - |
5563 | *code++ = OP_REVERSE; | - |
5564 | reverse_count = code; | - |
5565 | (code[0] = (0)), code += 1; | - |
5566 | length += 1 + 1; | - |
5567 | } | 0 |
5568 | | - |
5569 | | - |
5570 | | - |
5571 | | - |
5572 | if (!compile_branch(&options, &code, &ptr, errorcodeptr, &branchfirstchar, | 11-1203 |
5573 | &branchreqchar, &bc, cond_depth, cd, | 11-1203 |
5574 | (lengthptr == ((void *)0))? ((void *)0) : &length)) evaluated: !compile_branch(&options, &code, &ptr, errorcodeptr, &branchfirstchar, &branchreqchar, &bc, cond_depth, cd, (lengthptr == ((void *)0))? ((void *)0) : &length) yes Evaluation Count:11 | yes Evaluation Count:1203 |
| 11-1203 |
5575 | { | - |
5576 | *ptrptr = ptr; | - |
5577 | return 0; executed: return 0; Execution Count:11 | 11 |
5578 | } | - |
5579 | | - |
5580 | | - |
5581 | | - |
5582 | | - |
5583 | if (cd->bracount > max_bracount) max_bracount = cd->bracount; evaluated: cd->bracount > max_bracount yes Evaluation Count:272 | yes Evaluation Count:931 |
executed: max_bracount = cd->bracount; Execution Count:272 | 272-931 |
5584 | | - |
5585 | | - |
5586 | | - |
5587 | if (lengthptr == ((void *)0)) evaluated: lengthptr == ((void *)0) yes Evaluation Count:600 | yes Evaluation Count:603 |
| 600-603 |
5588 | { | - |
5589 | | - |
5590 | | - |
5591 | | - |
5592 | if (*last_branch != OP_ALT) evaluated: *last_branch != OP_ALT yes Evaluation Count:581 | yes Evaluation Count:19 |
| 19-581 |
5593 | { | - |
5594 | firstchar = branchfirstchar; | - |
5595 | reqchar = branchreqchar; | - |
5596 | } executed: } Execution Count:581 | 581 |
5597 | | - |
5598 | | - |
5599 | | - |
5600 | | - |
5601 | | - |
5602 | | - |
5603 | else | - |
5604 | { | - |
5605 | | - |
5606 | | - |
5607 | | - |
5608 | | - |
5609 | if (firstchar >= 0 && firstchar != branchfirstchar) evaluated: firstchar >= 0 yes Evaluation Count:16 | yes Evaluation Count:3 |
evaluated: firstchar != branchfirstchar yes Evaluation Count:15 | yes Evaluation Count:1 |
| 1-16 |
5610 | { | - |
5611 | if (reqchar < 0) reqchar = firstchar; evaluated: reqchar < 0 yes Evaluation Count:1 | yes Evaluation Count:14 |
executed: reqchar = firstchar; Execution Count:1 | 1-14 |
5612 | firstchar = (-1); | - |
5613 | } executed: } Execution Count:15 | 15 |
5614 | | - |
5615 | | - |
5616 | | - |
5617 | | - |
5618 | if (firstchar < 0 && branchfirstchar >= 0 && branchreqchar < 0) evaluated: firstchar < 0 yes Evaluation Count:18 | yes Evaluation Count:1 |
evaluated: branchfirstchar >= 0 yes Evaluation Count:16 | yes Evaluation Count:2 |
evaluated: branchreqchar < 0 yes Evaluation Count:1 | yes Evaluation Count:15 |
| 1-18 |
5619 | branchreqchar = branchfirstchar; executed: branchreqchar = branchfirstchar; Execution Count:1 | 1 |
5620 | | - |
5621 | | - |
5622 | | - |
5623 | if ((reqchar & ~0x20000000l) != (branchreqchar & ~0x20000000l)) partially evaluated: (reqchar & ~0x20000000l) != (branchreqchar & ~0x20000000l) yes Evaluation Count:19 | no Evaluation Count:0 |
| 0-19 |
5624 | reqchar = (-1); executed: reqchar = (-1); Execution Count:19 | 19 |
5625 | else reqchar |= branchreqchar; never executed: reqchar |= branchreqchar; | 0 |
5626 | } | - |
5627 | if (lookbehind) partially evaluated: lookbehind no Evaluation Count:0 | yes Evaluation Count:600 |
| 0-600 |
5628 | { | - |
5629 | int fixed_length; | - |
5630 | *code = OP_END; | - |
5631 | fixed_length = find_fixedlength(last_branch, (options & 0x00000800) != 0, | - |
5632 | 0, cd); | - |
5633 | ; | - |
5634 | if (fixed_length == -3) never evaluated: fixed_length == -3 | 0 |
5635 | { | - |
5636 | cd->check_lookbehind = 1; | - |
5637 | } | 0 |
5638 | else if (fixed_length < 0) never evaluated: fixed_length < 0 | 0 |
5639 | { | - |
5640 | *errorcodeptr = (fixed_length == -2)? ERR36 : never evaluated: (fixed_length == -2) | 0 |
5641 | (fixed_length == -4)? ERR70: ERR25; | - |
5642 | *ptrptr = ptr; | - |
5643 | return 0; never executed: return 0; | 0 |
5644 | } | - |
5645 | else { (reverse_count[0] = (fixed_length)); } | 0 |
5646 | } | - |
5647 | } executed: } Execution Count:600 | 600 |
5648 | if (*ptr != '\174') evaluated: *ptr != '\174' yes Evaluation Count:1164 | yes Evaluation Count:39 |
| 39-1164 |
5649 | { | - |
5650 | if (lengthptr == ((void *)0)) evaluated: lengthptr == ((void *)0) yes Evaluation Count:581 | yes Evaluation Count:583 |
| 581-583 |
5651 | { | - |
5652 | int branch_length = (int)(code - last_branch); | - |
5653 | do | - |
5654 | { | - |
5655 | int prev_length = (last_branch[1]); | - |
5656 | (last_branch[1] = (branch_length)); | - |
5657 | branch_length = prev_length; | - |
5658 | last_branch -= branch_length; | - |
5659 | } executed: } Execution Count:600 | 600 |
5660 | while (branch_length > 0); evaluated: branch_length > 0 yes Evaluation Count:19 | yes Evaluation Count:581 |
| 19-581 |
5661 | } executed: } Execution Count:581 | 581 |
5662 | | - |
5663 | | - |
5664 | | - |
5665 | *code = OP_KET; | - |
5666 | (code[1] = ((int)(code - start_bracket))); | - |
5667 | code += 1 + 1; | - |
5668 | | - |
5669 | | - |
5670 | | - |
5671 | | - |
5672 | | - |
5673 | if (capnumber > 0) evaluated: capnumber > 0 yes Evaluation Count:382 | yes Evaluation Count:782 |
| 382-782 |
5674 | { | - |
5675 | if (cd->open_caps->flag) partially evaluated: cd->open_caps->flag no Evaluation Count:0 | yes Evaluation Count:382 |
| 0-382 |
5676 | { | - |
5677 | memmove(start_bracket + 1 + 1, start_bracket, | - |
5678 | ((code - start_bracket) << 1)); | - |
5679 | *start_bracket = OP_ONCE; | - |
5680 | code += 1 + 1; | - |
5681 | (start_bracket[1] = ((int)(code - start_bracket))); | - |
5682 | *code = OP_KET; | - |
5683 | (code[1] = ((int)(code - start_bracket))); | - |
5684 | code += 1 + 1; | - |
5685 | length += 2 + 2*1; | - |
5686 | } | 0 |
5687 | cd->open_caps = cd->open_caps->next; | - |
5688 | } executed: } Execution Count:382 | 382 |
5689 | | - |
5690 | | - |
5691 | | - |
5692 | cd->bracount = max_bracount; | - |
5693 | | - |
5694 | | - |
5695 | | - |
5696 | *codeptr = code; | - |
5697 | *ptrptr = ptr; | - |
5698 | *firstcharptr = firstchar; | - |
5699 | *reqcharptr = reqchar; | - |
5700 | if (lengthptr != ((void *)0)) evaluated: lengthptr != ((void *)0) yes Evaluation Count:583 | yes Evaluation Count:581 |
| 581-583 |
5701 | { | - |
5702 | if ((2147483647 - 20) - *lengthptr < length) partially evaluated: (2147483647 - 20) - *lengthptr < length no Evaluation Count:0 | yes Evaluation Count:583 |
| 0-583 |
5703 | { | - |
5704 | *errorcodeptr = ERR20; | - |
5705 | return 0; never executed: return 0; | 0 |
5706 | } | - |
5707 | *lengthptr += length; | - |
5708 | } executed: } Execution Count:583 | 583 |
5709 | return 1; executed: return 1; Execution Count:1164 | 1164 |
5710 | } | - |
5711 | if (lengthptr != ((void *)0)) evaluated: lengthptr != ((void *)0) yes Evaluation Count:20 | yes Evaluation Count:19 |
| 19-20 |
5712 | { | - |
5713 | code = *codeptr + 1 + 1 + skipbytes; | - |
5714 | length += 1 + 1; | - |
5715 | } executed: } Execution Count:20 | 20 |
5716 | else | - |
5717 | { | - |
5718 | *code = OP_ALT; | - |
5719 | (code[1] = ((int)(code - last_branch))); | - |
5720 | bc.current_branch = last_branch = code; | - |
5721 | code += 1 + 1; | - |
5722 | } executed: } Execution Count:19 | 19 |
5723 | | - |
5724 | ptr++; | - |
5725 | } executed: } Execution Count:39 | 39 |
5726 | | - |
5727 | } | 0 |
5728 | static BOOL | - |
5729 | is_anchored(register const pcre_uchar *code, unsigned int bracket_map, | - |
5730 | unsigned int backref_map) | - |
5731 | { | - |
5732 | do { | - |
5733 | const pcre_uchar *scode = first_significant_code( | - |
5734 | code + _pcre16_OP_lengths[*code], 0); | - |
5735 | register int op = *scode; | - |
5736 | | - |
5737 | | - |
5738 | | - |
5739 | if (op == OP_BRA || op == OP_BRAPOS || evaluated: op == OP_BRA yes Evaluation Count:6 | yes Evaluation Count:421 |
partially evaluated: op == OP_BRAPOS no Evaluation Count:0 | yes Evaluation Count:421 |
| 0-421 |
5740 | op == OP_SBRA || op == OP_SBRAPOS) partially evaluated: op == OP_SBRA no Evaluation Count:0 | yes Evaluation Count:421 |
partially evaluated: op == OP_SBRAPOS no Evaluation Count:0 | yes Evaluation Count:421 |
| 0-421 |
5741 | { | - |
5742 | if (!is_anchored(scode, bracket_map, backref_map)) return 0; partially evaluated: !is_anchored(scode, bracket_map, backref_map) yes Evaluation Count:6 | no Evaluation Count:0 |
executed: return 0; Execution Count:6 | 0-6 |
5743 | } | 0 |
5744 | | - |
5745 | | - |
5746 | | - |
5747 | else if (op == OP_CBRA || op == OP_CBRAPOS || evaluated: op == OP_CBRA yes Evaluation Count:62 | yes Evaluation Count:359 |
partially evaluated: op == OP_CBRAPOS no Evaluation Count:0 | yes Evaluation Count:359 |
| 0-359 |
5748 | op == OP_SCBRA || op == OP_SCBRAPOS) partially evaluated: op == OP_SCBRA no Evaluation Count:0 | yes Evaluation Count:359 |
partially evaluated: op == OP_SCBRAPOS no Evaluation Count:0 | yes Evaluation Count:359 |
| 0-359 |
5749 | { | - |
5750 | int n = scode[1+1]; | - |
5751 | int new_map = bracket_map | ((n < 32)? (1 << n) : 1); | - |
5752 | if (!is_anchored(scode, new_map, backref_map)) return 0; partially evaluated: !is_anchored(scode, new_map, backref_map) yes Evaluation Count:62 | no Evaluation Count:0 |
executed: return 0; Execution Count:62 | 0-62 |
5753 | } | 0 |
5754 | | - |
5755 | | - |
5756 | | - |
5757 | else if (op == OP_ASSERT || op == OP_ONCE || op == OP_ONCE_NC || partially evaluated: op == OP_ASSERT no Evaluation Count:0 | yes Evaluation Count:359 |
partially evaluated: op == OP_ONCE no Evaluation Count:0 | yes Evaluation Count:359 |
partially evaluated: op == OP_ONCE_NC no Evaluation Count:0 | yes Evaluation Count:359 |
| 0-359 |
5758 | op == OP_COND) evaluated: op == OP_COND yes Evaluation Count:2 | yes Evaluation Count:357 |
| 2-357 |
5759 | { | - |
5760 | if (!is_anchored(scode, bracket_map, backref_map)) return 0; partially evaluated: !is_anchored(scode, bracket_map, backref_map) yes Evaluation Count:2 | no Evaluation Count:0 |
executed: return 0; Execution Count:2 | 0-2 |
5761 | } | 0 |
5762 | | - |
5763 | | - |
5764 | | - |
5765 | | - |
5766 | else if ((op == OP_TYPESTAR || op == OP_TYPEMINSTAR || evaluated: op == OP_TYPESTAR yes Evaluation Count:12 | yes Evaluation Count:345 |
evaluated: op == OP_TYPEMINSTAR yes Evaluation Count:1 | yes Evaluation Count:344 |
| 1-345 |
5767 | op == OP_TYPEPOSSTAR)) partially evaluated: op == OP_TYPEPOSSTAR no Evaluation Count:0 | yes Evaluation Count:344 |
| 0-344 |
5768 | { | - |
5769 | if (scode[1] != OP_ALLANY || (bracket_map & backref_map) != 0) partially evaluated: scode[1] != OP_ALLANY yes Evaluation Count:13 | no Evaluation Count:0 |
never evaluated: (bracket_map & backref_map) != 0 | 0-13 |
5770 | return 0; executed: return 0; Execution Count:13 | 13 |
5771 | } | 0 |
5772 | | - |
5773 | | - |
5774 | | - |
5775 | else if (op != OP_SOD && op != OP_SOM && op != OP_CIRC) return 0; evaluated: op != OP_SOD yes Evaluation Count:327 | yes Evaluation Count:17 |
evaluated: op != OP_SOM yes Evaluation Count:326 | yes Evaluation Count:1 |
evaluated: op != OP_CIRC yes Evaluation Count:306 | yes Evaluation Count:20 |
executed: return 0; Execution Count:306 | 1-327 |
5776 | code += (code[1]); | - |
5777 | } executed: } Execution Count:38 | 38 |
5778 | while (*code == OP_ALT); partially evaluated: *code == OP_ALT no Evaluation Count:0 | yes Evaluation Count:38 |
| 0-38 |
5779 | return 1; executed: return 1; Execution Count:38 | 38 |
5780 | } | - |
5781 | static BOOL | - |
5782 | is_startline(const pcre_uchar *code, unsigned int bracket_map, | - |
5783 | unsigned int backref_map) | - |
5784 | { | - |
5785 | do { | - |
5786 | const pcre_uchar *scode = first_significant_code( | - |
5787 | code + _pcre16_OP_lengths[*code], 0); | - |
5788 | register int op = *scode; | - |
5789 | | - |
5790 | | - |
5791 | | - |
5792 | | - |
5793 | | - |
5794 | | - |
5795 | if (op == OP_COND) evaluated: op == OP_COND yes Evaluation Count:2 | yes Evaluation Count:123 |
| 2-123 |
5796 | { | - |
5797 | scode += 1 + 1; | - |
5798 | if (*scode == OP_CALLOUT) scode += _pcre16_OP_lengths[OP_CALLOUT]; partially evaluated: *scode == OP_CALLOUT no Evaluation Count:0 | yes Evaluation Count:2 |
never executed: scode += _pcre16_OP_lengths[OP_CALLOUT]; | 0-2 |
5799 | switch (*scode) | - |
5800 | { | - |
5801 | case OP_CREF: | - |
5802 | case OP_NCREF: | - |
5803 | case OP_RREF: | - |
5804 | case OP_NRREF: | - |
5805 | case OP_DEF: | - |
5806 | return 0; executed: return 0; Execution Count:2 | 2 |
5807 | | - |
5808 | default: | - |
5809 | if (!is_startline(scode, bracket_map, backref_map)) return 0; never evaluated: !is_startline(scode, bracket_map, backref_map) never executed: return 0; | 0 |
5810 | do scode += (scode[1]); while (*scode == OP_ALT); never evaluated: *scode == OP_ALT never executed: scode += (scode[1]); | 0 |
5811 | scode += 1 + 1; | - |
5812 | break; | 0 |
5813 | } | - |
5814 | scode = first_significant_code(scode, 0); | - |
5815 | op = *scode; | - |
5816 | } | 0 |
5817 | | - |
5818 | | - |
5819 | | - |
5820 | if (op == OP_BRA || op == OP_BRAPOS || evaluated: op == OP_BRA yes Evaluation Count:5 | yes Evaluation Count:118 |
partially evaluated: op == OP_BRAPOS no Evaluation Count:0 | yes Evaluation Count:118 |
| 0-118 |
5821 | op == OP_SBRA || op == OP_SBRAPOS) partially evaluated: op == OP_SBRA no Evaluation Count:0 | yes Evaluation Count:118 |
partially evaluated: op == OP_SBRAPOS no Evaluation Count:0 | yes Evaluation Count:118 |
| 0-118 |
5822 | { | - |
5823 | if (!is_startline(scode, bracket_map, backref_map)) return 0; partially evaluated: !is_startline(scode, bracket_map, backref_map) yes Evaluation Count:5 | no Evaluation Count:0 |
executed: return 0; Execution Count:5 | 0-5 |
5824 | } | 0 |
5825 | | - |
5826 | | - |
5827 | | - |
5828 | else if (op == OP_CBRA || op == OP_CBRAPOS || evaluated: op == OP_CBRA yes Evaluation Count:39 | yes Evaluation Count:79 |
partially evaluated: op == OP_CBRAPOS no Evaluation Count:0 | yes Evaluation Count:79 |
| 0-79 |
5829 | op == OP_SCBRA || op == OP_SCBRAPOS) partially evaluated: op == OP_SCBRA no Evaluation Count:0 | yes Evaluation Count:79 |
partially evaluated: op == OP_SCBRAPOS no Evaluation Count:0 | yes Evaluation Count:79 |
| 0-79 |
5830 | { | - |
5831 | int n = scode[1+1]; | - |
5832 | int new_map = bracket_map | ((n < 32)? (1 << n) : 1); | - |
5833 | if (!is_startline(scode, new_map, backref_map)) return 0; evaluated: !is_startline(scode, new_map, backref_map) yes Evaluation Count:37 | yes Evaluation Count:2 |
executed: return 0; Execution Count:37 | 2-37 |
5834 | } executed: } Execution Count:2 | 2 |
5835 | | - |
5836 | | - |
5837 | | - |
5838 | else if (op == OP_ASSERT || op == OP_ONCE || op == OP_ONCE_NC) partially evaluated: op == OP_ASSERT no Evaluation Count:0 | yes Evaluation Count:79 |
partially evaluated: op == OP_ONCE no Evaluation Count:0 | yes Evaluation Count:79 |
partially evaluated: op == OP_ONCE_NC no Evaluation Count:0 | yes Evaluation Count:79 |
| 0-79 |
5839 | { | - |
5840 | if (!is_startline(scode, bracket_map, backref_map)) return 0; never evaluated: !is_startline(scode, bracket_map, backref_map) never executed: return 0; | 0 |
5841 | } | 0 |
5842 | | - |
5843 | | - |
5844 | | - |
5845 | | - |
5846 | else if (op == OP_TYPESTAR || op == OP_TYPEMINSTAR || op == OP_TYPEPOSSTAR) evaluated: op == OP_TYPESTAR yes Evaluation Count:12 | yes Evaluation Count:67 |
evaluated: op == OP_TYPEMINSTAR yes Evaluation Count:1 | yes Evaluation Count:66 |
partially evaluated: op == OP_TYPEPOSSTAR no Evaluation Count:0 | yes Evaluation Count:66 |
| 0-67 |
5847 | { | - |
5848 | if (scode[1] != OP_ANY || (bracket_map & backref_map) != 0) return 0; evaluated: scode[1] != OP_ANY yes Evaluation Count:5 | yes Evaluation Count:8 |
partially evaluated: (bracket_map & backref_map) != 0 no Evaluation Count:0 | yes Evaluation Count:8 |
executed: return 0; Execution Count:5 | 0-8 |
5849 | } executed: } Execution Count:8 | 8 |
5850 | | - |
5851 | | - |
5852 | | - |
5853 | else if (op != OP_CIRC && op != OP_CIRCM) return 0; partially evaluated: op != OP_CIRC yes Evaluation Count:66 | no Evaluation Count:0 |
evaluated: op != OP_CIRCM yes Evaluation Count:64 | yes Evaluation Count:2 |
executed: return 0; Execution Count:64 | 0-66 |
5854 | | - |
5855 | | - |
5856 | | - |
5857 | code += (code[1]); | - |
5858 | } executed: } Execution Count:12 | 12 |
5859 | while (*code == OP_ALT); partially evaluated: *code == OP_ALT no Evaluation Count:0 | yes Evaluation Count:12 |
| 0-12 |
5860 | return 1; executed: return 1; Execution Count:12 | 12 |
5861 | } | - |
5862 | static int | - |
5863 | find_firstassertedchar(const pcre_uchar *code, BOOL inassert) | - |
5864 | { | - |
5865 | register int c = -1; | - |
5866 | do { | - |
5867 | int d; | - |
5868 | int xl = (*code == OP_CBRA || *code == OP_SCBRA || evaluated: *code == OP_CBRA yes Evaluation Count:39 | yes Evaluation Count:88 |
partially evaluated: *code == OP_SCBRA no Evaluation Count:0 | yes Evaluation Count:88 |
| 0-88 |
5869 | *code == OP_CBRAPOS || *code == OP_SCBRAPOS)? 1:0; partially evaluated: *code == OP_CBRAPOS no Evaluation Count:0 | yes Evaluation Count:88 |
partially evaluated: *code == OP_SCBRAPOS no Evaluation Count:0 | yes Evaluation Count:88 |
| 0-88 |
5870 | const pcre_uchar *scode = first_significant_code(code + 1+1 + xl, | - |
5871 | 1); | - |
5872 | register int op = *scode; | - |
5873 | | - |
5874 | switch(op) | - |
5875 | { | - |
5876 | default: | - |
5877 | return -1; executed: return -1; Execution Count:66 | 66 |
5878 | | - |
5879 | case OP_BRA: | - |
5880 | case OP_BRAPOS: | - |
5881 | case OP_CBRA: | - |
5882 | case OP_SCBRA: | - |
5883 | case OP_CBRAPOS: | - |
5884 | case OP_SCBRAPOS: | - |
5885 | case OP_ASSERT: | - |
5886 | case OP_ONCE: | - |
5887 | case OP_ONCE_NC: | - |
5888 | case OP_COND: | - |
5889 | if ((d = find_firstassertedchar(scode, op == OP_ASSERT)) < 0) partially evaluated: (d = find_firstassertedchar(scode, op == OP_ASSERT)) < 0 yes Evaluation Count:46 | no Evaluation Count:0 |
| 0-46 |
5890 | return -1; executed: return -1; Execution Count:46 | 46 |
5891 | if (c < 0) c = d; else if (c != d) return -1; never executed: return -1; | 0 |
5892 | break; | 0 |
5893 | | - |
5894 | case OP_EXACT: | - |
5895 | scode += 1; | - |
5896 | | - |
5897 | | - |
5898 | case OP_CHAR: code before this statement never executed: case OP_CHAR: | 0 |
5899 | case OP_PLUS: | - |
5900 | case OP_MINPLUS: | - |
5901 | case OP_POSPLUS: | - |
5902 | if (!inassert) return -1; partially evaluated: !inassert yes Evaluation Count:15 | no Evaluation Count:0 |
executed: return -1; Execution Count:15 | 0-15 |
5903 | if (c < 0) c = scode[1]; never executed: c = scode[1]; | 0 |
5904 | else if (c != scode[1]) return -1; never evaluated: c != scode[1] never executed: return -1; | 0 |
5905 | break; | 0 |
5906 | | - |
5907 | case OP_EXACTI: | - |
5908 | scode += 1; | - |
5909 | | - |
5910 | | - |
5911 | case OP_CHARI: code before this statement never executed: case OP_CHARI: | 0 |
5912 | case OP_PLUSI: | - |
5913 | case OP_MINPLUSI: | - |
5914 | case OP_POSPLUSI: | - |
5915 | if (!inassert) return -1; never evaluated: !inassert never executed: return -1; | 0 |
5916 | if (c < 0) c = scode[1] | 0x10000000l; never executed: c = scode[1] | 0x10000000l; | 0 |
5917 | else if (c != scode[1]) return -1; never evaluated: c != scode[1] never executed: return -1; | 0 |
5918 | break; | 0 |
5919 | } | - |
5920 | | - |
5921 | code += (code[1]); | - |
5922 | } | 0 |
5923 | while (*code == OP_ALT); never evaluated: *code == OP_ALT | 0 |
5924 | return c; never executed: return c; | 0 |
5925 | } | - |
5926 | extern pcre16 * | - |
5927 | pcre16_compile(const unsigned short * pattern, int options, const char **errorptr, | - |
5928 | int *erroroffset, const unsigned char *tables) | - |
5929 | | - |
5930 | { | - |
5931 | | - |
5932 | | - |
5933 | | - |
5934 | return pcre16_compile2(pattern, options, ((void *)0), errorptr, erroroffset, tables); never executed: return pcre16_compile2(pattern, options, ((void *)0), errorptr, erroroffset, tables); | 0 |
5935 | | - |
5936 | } | - |
5937 | | - |
5938 | | - |
5939 | | - |
5940 | | - |
5941 | | - |
5942 | | - |
5943 | | - |
5944 | extern pcre16 * | - |
5945 | pcre16_compile2(const unsigned short * pattern, int options, int *errorcodeptr, | - |
5946 | const char **errorptr, int *erroroffset, const unsigned char *tables) | - |
5947 | | - |
5948 | { | - |
5949 | real_pcre16 *re; | - |
5950 | int length = 1; | - |
5951 | pcre_int32 firstchar, reqchar; | - |
5952 | int newline; | - |
5953 | int errorcode = 0; | - |
5954 | int skipatstart = 0; | - |
5955 | BOOL utf; | - |
5956 | size_t size; | - |
5957 | pcre_uchar *code; | - |
5958 | const pcre_uchar *codestart; | - |
5959 | const pcre_uchar *ptr; | - |
5960 | compile_data compile_block; | - |
5961 | compile_data *cd = &compile_block; | - |
5962 | pcre_uchar cworkspace[(2048*1)]; | - |
5963 | | - |
5964 | | - |
5965 | | - |
5966 | ptr = (const pcre_uchar *)pattern; | - |
5967 | | - |
5968 | | - |
5969 | | - |
5970 | | - |
5971 | | - |
5972 | if (errorptr == ((void *)0)) partially evaluated: errorptr == ((void *)0) no Evaluation Count:0 | yes Evaluation Count:369 |
| 0-369 |
5973 | { | - |
5974 | if (errorcodeptr != ((void *)0)) *errorcodeptr = 99; never evaluated: errorcodeptr != ((void *)0) never executed: *errorcodeptr = 99; | 0 |
5975 | return ((void *)0); never executed: return ((void *)0); | 0 |
5976 | } | - |
5977 | | - |
5978 | *errorptr = ((void *)0); | - |
5979 | if (errorcodeptr != ((void *)0)) *errorcodeptr = ERR0; partially evaluated: errorcodeptr != ((void *)0) yes Evaluation Count:369 | no Evaluation Count:0 |
executed: *errorcodeptr = ERR0; Execution Count:369 | 0-369 |
5980 | | - |
5981 | | - |
5982 | | - |
5983 | if (erroroffset == ((void *)0)) partially evaluated: erroroffset == ((void *)0) no Evaluation Count:0 | yes Evaluation Count:369 |
| 0-369 |
5984 | { | - |
5985 | errorcode = ERR16; | - |
5986 | goto PCRE_EARLY_ERROR_RETURN2; never executed: goto PCRE_EARLY_ERROR_RETURN2; | 0 |
5987 | } | - |
5988 | | - |
5989 | *erroroffset = 0; | - |
5990 | | - |
5991 | | - |
5992 | | - |
5993 | if (tables == ((void *)0)) tables = _pcre16_default_tables; partially evaluated: tables == ((void *)0) yes Evaluation Count:369 | no Evaluation Count:0 |
executed: tables = _pcre16_default_tables; Execution Count:369 | 0-369 |
5994 | cd->lcc = tables + 0; | - |
5995 | cd->fcc = tables + 256; | - |
5996 | cd->cbits = tables + 512; | - |
5997 | cd->ctypes = tables + (512 + 320); | - |
5998 | | - |
5999 | | - |
6000 | | - |
6001 | if ((options & ~(0x00000001|0x00000008|0x00000010|0x00000002| 0x00000004|0x00000020|0x00000040|0x00000200|0x00000800| 0x00001000|0x00002000|0x00004000|0x00040000| 0x00080000|(0x00100000|0x00200000|0x00400000| 0x00500000)|0x00800000|0x01000000| 0x02000000|0x20000000|0x04000000)) != 0) partially evaluated: (options & ~(0x00000001|0x00000008|0x00000010|0x00000002| 0x00000004|0x00000020|0x00000040|0x00000200|0x00000800| 0x00001000|0x00002000|0x00004000|0x00040000| 0x00080000|(0x00100000|0x00200000|0x00400000| 0x00500000)|0x00800000|0x01000000| 0x02000000|0x20000000|0x04000000)) != 0 no Evaluation Count:0 | yes Evaluation Count:369 |
| 0-369 |
6002 | { | - |
6003 | errorcode = ERR17; | - |
6004 | goto PCRE_EARLY_ERROR_RETURN; never executed: goto PCRE_EARLY_ERROR_RETURN; | 0 |
6005 | } | - |
6006 | | - |
6007 | | - |
6008 | | - |
6009 | | - |
6010 | while (ptr[skipatstart] == '\050' && evaluated: ptr[skipatstart] == '\050' yes Evaluation Count:49 | yes Evaluation Count:323 |
| 49-323 |
6011 | ptr[skipatstart+1] == '\052') evaluated: ptr[skipatstart+1] == '\052' yes Evaluation Count:3 | yes Evaluation Count:46 |
| 3-46 |
6012 | { | - |
6013 | int newnl = 0; | - |
6014 | int newbsr = 0; | - |
6015 | | - |
6016 | | - |
6017 | | - |
6018 | | - |
6019 | | - |
6020 | | - |
6021 | if (_pcre16_strncmp_uc_c8((ptr+skipatstart+2), ("\125" "\124" "\106" "\061" "\066" "\051"), (6)) == 0) partially evaluated: _pcre16_strncmp_uc_c8((ptr+skipatstart+2), ("\125" "\124" "\106" "\061" "\066" "\051"), (6)) == 0 no Evaluation Count:0 | yes Evaluation Count:3 |
| 0-3 |
6022 | { skipatstart += 8; options |= 0x00000800; continue; } never executed: continue; | 0 |
6023 | | - |
6024 | else if (_pcre16_strncmp_uc_c8((ptr+skipatstart+2), ("\125" "\103" "\120" "\051"), (4)) == 0) partially evaluated: _pcre16_strncmp_uc_c8((ptr+skipatstart+2), ("\125" "\103" "\120" "\051"), (4)) == 0 no Evaluation Count:0 | yes Evaluation Count:3 |
| 0-3 |
6025 | { skipatstart += 6; options |= 0x20000000; continue; } never executed: continue; | 0 |
6026 | else if (_pcre16_strncmp_uc_c8((ptr+skipatstart+2), ("\116" "\117" "\137" "\123" "\124" "\101" "\122" "\124" "\137" "\117" "\120" "\124" "\051"), (13)) == 0) partially evaluated: _pcre16_strncmp_uc_c8((ptr+skipatstart+2), ("\116" "\117" "\137" "\123" "\124" "\101" "\122" "\124" "\137" "\117" "\120" "\124" "\051"), (13)) == 0 no Evaluation Count:0 | yes Evaluation Count:3 |
| 0-3 |
6027 | { skipatstart += 15; options |= 0x04000000; continue; } never executed: continue; | 0 |
6028 | | - |
6029 | if (_pcre16_strncmp_uc_c8((ptr+skipatstart+2), ("\103" "\122" "\051"), (3)) == 0) partially evaluated: _pcre16_strncmp_uc_c8((ptr+skipatstart+2), ("\103" "\122" "\051"), (3)) == 0 no Evaluation Count:0 | yes Evaluation Count:3 |
| 0-3 |
6030 | { skipatstart += 5; newnl = 0x00100000; } | 0 |
6031 | else if (_pcre16_strncmp_uc_c8((ptr+skipatstart+2), ("\114" "\106" "\051"), (3)) == 0) partially evaluated: _pcre16_strncmp_uc_c8((ptr+skipatstart+2), ("\114" "\106" "\051"), (3)) == 0 no Evaluation Count:0 | yes Evaluation Count:3 |
| 0-3 |
6032 | { skipatstart += 5; newnl = 0x00200000; } | 0 |
6033 | else if (_pcre16_strncmp_uc_c8((ptr+skipatstart+2), ("\103" "\122" "\114" "\106" "\051"), (5)) == 0) evaluated: _pcre16_strncmp_uc_c8((ptr+skipatstart+2), ("\103" "\122" "\114" "\106" "\051"), (5)) == 0 yes Evaluation Count:2 | yes Evaluation Count:1 |
| 1-2 |
6034 | { skipatstart += 7; newnl = 0x00100000 + 0x00200000; } executed: } Execution Count:2 | 2 |
6035 | else if (_pcre16_strncmp_uc_c8((ptr+skipatstart+2), ("\101" "\116" "\131" "\051"), (4)) == 0) partially evaluated: _pcre16_strncmp_uc_c8((ptr+skipatstart+2), ("\101" "\116" "\131" "\051"), (4)) == 0 no Evaluation Count:0 | yes Evaluation Count:1 |
| 0-1 |
6036 | { skipatstart += 6; newnl = 0x00400000; } | 0 |
6037 | else if (_pcre16_strncmp_uc_c8((ptr+skipatstart+2), ("\101" "\116" "\131" "\103" "\122" "\114" "\106" "\051"), (8)) == 0) partially evaluated: _pcre16_strncmp_uc_c8((ptr+skipatstart+2), ("\101" "\116" "\131" "\103" "\122" "\114" "\106" "\051"), (8)) == 0 yes Evaluation Count:1 | no Evaluation Count:0 |
| 0-1 |
6038 | { skipatstart += 10; newnl = 0x00500000; } executed: } Execution Count:1 | 1 |
6039 | | - |
6040 | else if (_pcre16_strncmp_uc_c8((ptr+skipatstart+2), ("\102" "\123" "\122" "\137" "\101" "\116" "\131" "\103" "\122" "\114" "\106" "\051"), (12)) == 0) never evaluated: _pcre16_strncmp_uc_c8((ptr+skipatstart+2), ("\102" "\123" "\122" "\137" "\101" "\116" "\131" "\103" "\122" "\114" "\106" "\051"), (12)) == 0 | 0 |
6041 | { skipatstart += 14; newbsr = 0x00800000; } | 0 |
6042 | else if (_pcre16_strncmp_uc_c8((ptr+skipatstart+2), ("\102" "\123" "\122" "\137" "\125" "\116" "\111" "\103" "\117" "\104" "\105" "\051"), (12)) == 0) never evaluated: _pcre16_strncmp_uc_c8((ptr+skipatstart+2), ("\102" "\123" "\122" "\137" "\125" "\116" "\111" "\103" "\117" "\104" "\105" "\051"), (12)) == 0 | 0 |
6043 | { skipatstart += 14; newbsr = 0x01000000; } | 0 |
6044 | | - |
6045 | if (newnl != 0) partially evaluated: newnl != 0 yes Evaluation Count:3 | no Evaluation Count:0 |
| 0-3 |
6046 | options = (options & ~(0x00100000|0x00200000|0x00400000| 0x00500000)) | newnl; executed: options = (options & ~(0x00100000|0x00200000|0x00400000| 0x00500000)) | newnl; Execution Count:3 | 3 |
6047 | else if (newbsr != 0) never evaluated: newbsr != 0 | 0 |
6048 | options = (options & ~(0x00800000|0x01000000)) | newbsr; never executed: options = (options & ~(0x00800000|0x01000000)) | newbsr; | 0 |
6049 | else break; | 0 |
6050 | } | - |
6051 | | - |
6052 | | - |
6053 | utf = (options & 0x00000800) != 0; | - |
6054 | | - |
6055 | | - |
6056 | | - |
6057 | | - |
6058 | | - |
6059 | | - |
6060 | | - |
6061 | if (utf && (options & 0x00002000) == 0 && partially evaluated: utf yes Evaluation Count:369 | no Evaluation Count:0 |
partially evaluated: (options & 0x00002000) == 0 yes Evaluation Count:369 | no Evaluation Count:0 |
| 0-369 |
6062 | (errorcode = _pcre16_valid_utf((const pcre_uchar *)pattern, -1, erroroffset)) != 0) evaluated: (errorcode = _pcre16_valid_utf((const pcre_uchar *)pattern, -1, erroroffset)) != 0 yes Evaluation Count:1 | yes Evaluation Count:368 |
| 1-368 |
6063 | { | - |
6064 | | - |
6065 | | - |
6066 | | - |
6067 | errorcode = ERR74; | - |
6068 | | - |
6069 | goto PCRE_EARLY_ERROR_RETURN2; executed: goto PCRE_EARLY_ERROR_RETURN2; Execution Count:1 | 1 |
6070 | } | - |
6071 | if ((options & (0x00800000|0x01000000)) == | 0-368 |
6072 | (0x00800000|0x01000000)) partially evaluated: (options & (0x00800000|0x01000000)) == (0x00800000|0x01000000) no Evaluation Count:0 | yes Evaluation Count:368 |
| 0-368 |
6073 | { | - |
6074 | errorcode = ERR56; | - |
6075 | goto PCRE_EARLY_ERROR_RETURN; never executed: goto PCRE_EARLY_ERROR_RETURN; | 0 |
6076 | } | - |
6077 | | - |
6078 | | - |
6079 | | - |
6080 | | - |
6081 | | - |
6082 | switch (options & (0x00100000|0x00200000|0x00400000| 0x00500000)) | - |
6083 | { | - |
6084 | case 0: newline = 10; break; executed: break; Execution Count:365 | 365 |
6085 | case 0x00100000: newline = '\015'; break; | 0 |
6086 | case 0x00200000: newline = '\012'; break; | 0 |
6087 | case 0x00100000 + | - |
6088 | 0x00200000: newline = ('\015' << 8) | '\012'; break; executed: break; Execution Count:2 | 2 |
6089 | case 0x00400000: newline = -1; break; | 0 |
6090 | case 0x00500000: newline = -2; break; executed: break; Execution Count:1 | 1 |
6091 | default: errorcode = ERR56; goto PCRE_EARLY_ERROR_RETURN; never executed: goto PCRE_EARLY_ERROR_RETURN; | 0 |
6092 | } | - |
6093 | | - |
6094 | if (newline == -2) evaluated: newline == -2 yes Evaluation Count:1 | yes Evaluation Count:367 |
| 1-367 |
6095 | { | - |
6096 | cd->nltype = 2; | - |
6097 | } executed: } Execution Count:1 | 1 |
6098 | else if (newline < 0) partially evaluated: newline < 0 no Evaluation Count:0 | yes Evaluation Count:367 |
| 0-367 |
6099 | { | - |
6100 | cd->nltype = 1; | - |
6101 | } | 0 |
6102 | else | - |
6103 | { | - |
6104 | cd->nltype = 0; | - |
6105 | if (newline > 255) evaluated: newline > 255 yes Evaluation Count:2 | yes Evaluation Count:365 |
| 2-365 |
6106 | { | - |
6107 | cd->nllen = 2; | - |
6108 | cd->nl[0] = (newline >> 8) & 255; | - |
6109 | cd->nl[1] = newline & 255; | - |
6110 | } executed: } Execution Count:2 | 2 |
6111 | else | - |
6112 | { | - |
6113 | cd->nllen = 1; | - |
6114 | cd->nl[0] = newline; | - |
6115 | } executed: } Execution Count:365 | 365 |
6116 | } | - |
6117 | | - |
6118 | | - |
6119 | | - |
6120 | | - |
6121 | | - |
6122 | cd->top_backref = 0; | - |
6123 | cd->backref_map = 0; | - |
6124 | | - |
6125 | | - |
6126 | | - |
6127 | ; | - |
6128 | | - |
6129 | | - |
6130 | | - |
6131 | ; | - |
6132 | cd->bracount = cd->final_bracount = 0; | - |
6133 | cd->names_found = 0; | - |
6134 | cd->name_entry_size = 0; | - |
6135 | cd->name_table = ((void *)0); | - |
6136 | cd->start_code = cworkspace; | - |
6137 | cd->hwm = cworkspace; | - |
6138 | cd->start_workspace = cworkspace; | - |
6139 | cd->workspace_size = (2048*1); | - |
6140 | cd->start_pattern = (const pcre_uchar *)pattern; | - |
6141 | cd->end_pattern = (const pcre_uchar *)(pattern + _pcre16_strlen_uc((const pcre_uchar *)pattern)); | - |
6142 | cd->req_varyopt = 0; | - |
6143 | cd->assert_depth = 0; | - |
6144 | cd->external_options = options; | - |
6145 | cd->external_flags = 0; | - |
6146 | cd->open_caps = ((void *)0); | - |
6147 | | - |
6148 | | - |
6149 | | - |
6150 | | - |
6151 | | - |
6152 | | - |
6153 | | - |
6154 | ptr += skipatstart; | - |
6155 | code = cworkspace; | - |
6156 | *code = OP_BRA; | - |
6157 | (void)compile_regex(cd->external_options, &code, &ptr, &errorcode, 0, | - |
6158 | 0, 0, 0, &firstchar, &reqchar, ((void *)0), cd, &length); | - |
6159 | if (errorcode != 0) goto PCRE_EARLY_ERROR_RETURN; evaluated: errorcode != 0 yes Evaluation Count:11 | yes Evaluation Count:357 |
executed: goto PCRE_EARLY_ERROR_RETURN; Execution Count:11 | 11-357 |
6160 | | - |
6161 | ; | - |
6162 | | - |
6163 | | - |
6164 | if (length > (1 << 16)) partially evaluated: length > (1 << 16) no Evaluation Count:0 | yes Evaluation Count:357 |
| 0-357 |
6165 | { | - |
6166 | errorcode = ERR20; | - |
6167 | goto PCRE_EARLY_ERROR_RETURN; never executed: goto PCRE_EARLY_ERROR_RETURN; | 0 |
6168 | } | - |
6169 | | - |
6170 | | - |
6171 | | - |
6172 | | - |
6173 | | - |
6174 | | - |
6175 | size = sizeof(real_pcre16) + (length + cd->names_found * cd->name_entry_size) * sizeof(pcre_uchar); | - |
6176 | re = (real_pcre16 *)(pcre16_malloc)(size); | - |
6177 | | - |
6178 | if (re == ((void *)0)) partially evaluated: re == ((void *)0) no Evaluation Count:0 | yes Evaluation Count:357 |
| 0-357 |
6179 | { | - |
6180 | errorcode = ERR21; | - |
6181 | goto PCRE_EARLY_ERROR_RETURN; never executed: goto PCRE_EARLY_ERROR_RETURN; | 0 |
6182 | } | - |
6183 | | - |
6184 | | - |
6185 | | - |
6186 | | - |
6187 | | - |
6188 | | - |
6189 | | - |
6190 | re->magic_number = 0x50435245UL; | - |
6191 | re->size = (int)size; | - |
6192 | re->options = cd->external_options; | - |
6193 | re->flags = cd->external_flags; | - |
6194 | re->dummy1 = 0; | - |
6195 | re->first_char = 0; | - |
6196 | re->req_char = 0; | - |
6197 | re->name_table_offset = sizeof(real_pcre16) / sizeof(pcre_uchar); | - |
6198 | re->name_entry_size = cd->name_entry_size; | - |
6199 | re->name_count = cd->names_found; | - |
6200 | re->ref_count = 0; | - |
6201 | re->tables = (tables == _pcre16_default_tables)? ((void *)0) : tables; partially evaluated: (tables == _pcre16_default_tables) yes Evaluation Count:357 | no Evaluation Count:0 |
| 0-357 |
6202 | re->nullpad = ((void *)0); | - |
6203 | cd->final_bracount = cd->bracount; | - |
6204 | cd->assert_depth = 0; | - |
6205 | cd->bracount = 0; | - |
6206 | cd->names_found = 0; | - |
6207 | cd->name_table = (pcre_uchar *)re + re->name_table_offset; | - |
6208 | codestart = cd->name_table + re->name_entry_size * re->name_count; | - |
6209 | cd->start_code = codestart; | - |
6210 | cd->hwm = (pcre_uchar *)(cd->start_workspace); | - |
6211 | cd->req_varyopt = 0; | - |
6212 | cd->had_accept = 0; | - |
6213 | cd->check_lookbehind = 0; | - |
6214 | cd->open_caps = ((void *)0); | - |
6215 | | - |
6216 | | - |
6217 | | - |
6218 | | - |
6219 | | - |
6220 | ptr = (const pcre_uchar *)pattern + skipatstart; | - |
6221 | code = (pcre_uchar *)codestart; | - |
6222 | *code = OP_BRA; | - |
6223 | (void)compile_regex(re->options, &code, &ptr, &errorcode, 0, 0, 0, 0, | - |
6224 | &firstchar, &reqchar, ((void *)0), cd, ((void *)0)); | - |
6225 | re->top_bracket = cd->bracount; | - |
6226 | re->top_backref = cd->top_backref; | - |
6227 | re->flags = cd->external_flags | 0x0002; | - |
6228 | | - |
6229 | if (cd->had_accept) reqchar = (-1); partially evaluated: cd->had_accept no Evaluation Count:0 | yes Evaluation Count:357 |
never executed: reqchar = (-1); | 0-357 |
6230 | | - |
6231 | | - |
6232 | | - |
6233 | if (errorcode == 0 && *ptr != 0) errorcode = ERR22; partially evaluated: errorcode == 0 yes Evaluation Count:357 | no Evaluation Count:0 |
partially evaluated: *ptr != 0 no Evaluation Count:0 | yes Evaluation Count:357 |
never executed: errorcode = ERR22; | 0-357 |
6234 | | - |
6235 | | - |
6236 | | - |
6237 | | - |
6238 | *code++ = OP_END; | - |
6239 | | - |
6240 | | - |
6241 | if (code - codestart > length) errorcode = ERR23; partially evaluated: code - codestart > length no Evaluation Count:0 | yes Evaluation Count:357 |
never executed: errorcode = ERR23; | 0-357 |
6242 | | - |
6243 | | - |
6244 | | - |
6245 | | - |
6246 | | - |
6247 | if (cd->hwm > cd->start_workspace) evaluated: cd->hwm > cd->start_workspace yes Evaluation Count:2 | yes Evaluation Count:355 |
| 2-355 |
6248 | { | - |
6249 | int prev_recno = -1; | - |
6250 | const pcre_uchar *groupptr = ((void *)0); | - |
6251 | while (errorcode == 0 && cd->hwm > cd->start_workspace) partially evaluated: errorcode == 0 yes Evaluation Count:4 | no Evaluation Count:0 |
evaluated: cd->hwm > cd->start_workspace yes Evaluation Count:2 | yes Evaluation Count:2 |
| 0-4 |
6252 | { | - |
6253 | int offset, recno; | - |
6254 | cd->hwm -= 1; | - |
6255 | offset = (cd->hwm[0]); | - |
6256 | recno = (codestart[offset]); | - |
6257 | if (recno != prev_recno) partially evaluated: recno != prev_recno yes Evaluation Count:2 | no Evaluation Count:0 |
| 0-2 |
6258 | { | - |
6259 | groupptr = _pcre16_find_bracket(codestart, utf, recno); | - |
6260 | prev_recno = recno; | - |
6261 | } executed: } Execution Count:2 | 2 |
6262 | if (groupptr == ((void *)0)) errorcode = ERR53; partially evaluated: groupptr == ((void *)0) no Evaluation Count:0 | yes Evaluation Count:2 |
never executed: errorcode = ERR53; | 0-2 |
6263 | else (((pcre_uchar *)codestart)[offset] = ((int)(groupptr - codestart))); executed: (((pcre_uchar *)codestart)[offset] = ((int)(groupptr - codestart))); Execution Count:2 | 2 |
6264 | } | - |
6265 | } executed: } Execution Count:2 | 2 |
6266 | | - |
6267 | | - |
6268 | | - |
6269 | if (cd->workspace_size > (2048*1)) partially evaluated: cd->workspace_size > (2048*1) no Evaluation Count:0 | yes Evaluation Count:357 |
| 0-357 |
6270 | (pcre16_free)((void *)cd->start_workspace); never executed: (pcre16_free)((void *)cd->start_workspace); | 0 |
6271 | | - |
6272 | | - |
6273 | | - |
6274 | | - |
6275 | if (errorcode == 0 && re->top_backref > re->top_bracket) errorcode = ERR15; partially evaluated: errorcode == 0 yes Evaluation Count:357 | no Evaluation Count:0 |
partially evaluated: re->top_backref > re->top_bracket no Evaluation Count:0 | yes Evaluation Count:357 |
never executed: errorcode = ERR15; | 0-357 |
6276 | if (cd->check_lookbehind) partially evaluated: cd->check_lookbehind no Evaluation Count:0 | yes Evaluation Count:357 |
| 0-357 |
6277 | { | - |
6278 | pcre_uchar *cc = (pcre_uchar *)codestart; | - |
6279 | | - |
6280 | | - |
6281 | | - |
6282 | | - |
6283 | | - |
6284 | | - |
6285 | for (cc = (pcre_uchar *)_pcre16_find_bracket(codestart, utf, -1); | - |
6286 | cc != ((void *)0); never evaluated: cc != ((void *)0) | 0 |
6287 | cc = (pcre_uchar *)_pcre16_find_bracket(cc, utf, -1)) | - |
6288 | { | - |
6289 | if ((cc[1]) == 0) never evaluated: (cc[1]) == 0 | 0 |
6290 | { | - |
6291 | int fixed_length; | - |
6292 | pcre_uchar *be = cc - 1 - 1 + (cc[-1]); | - |
6293 | int end_op = *be; | - |
6294 | *be = OP_END; | - |
6295 | fixed_length = find_fixedlength(cc, (re->options & 0x00000800) != 0, 1, | - |
6296 | cd); | - |
6297 | *be = end_op; | - |
6298 | ; | - |
6299 | if (fixed_length < 0) never evaluated: fixed_length < 0 | 0 |
6300 | { | - |
6301 | errorcode = (fixed_length == -2)? ERR36 : never evaluated: (fixed_length == -2) | 0 |
6302 | (fixed_length == -4)? ERR70 : ERR25; | - |
6303 | break; | 0 |
6304 | } | - |
6305 | (cc[1] = (fixed_length)); | - |
6306 | } | 0 |
6307 | cc += 1 + 1; | - |
6308 | } | 0 |
6309 | } | 0 |
6310 | | - |
6311 | | - |
6312 | | - |
6313 | if (errorcode != 0) partially evaluated: errorcode != 0 no Evaluation Count:0 | yes Evaluation Count:357 |
| 0-357 |
6314 | { | - |
6315 | (pcre16_free)(re); | - |
6316 | PCRE_EARLY_ERROR_RETURN: code before this statement never executed: PCRE_EARLY_ERROR_RETURN: | 0 |
6317 | *erroroffset = (int)(ptr - (const pcre_uchar *)pattern); | - |
6318 | PCRE_EARLY_ERROR_RETURN2: code before this statement executed: PCRE_EARLY_ERROR_RETURN2: Execution Count:11 | 11 |
6319 | *errorptr = find_error_text(errorcode); | - |
6320 | if (errorcodeptr != ((void *)0)) *errorcodeptr = errorcode; partially evaluated: errorcodeptr != ((void *)0) yes Evaluation Count:12 | no Evaluation Count:0 |
executed: *errorcodeptr = errorcode; Execution Count:12 | 0-12 |
6321 | return ((void *)0); executed: return ((void *)0); Execution Count:12 | 12 |
6322 | } | - |
6323 | if ((re->options & 0x00000010) == 0) partially evaluated: (re->options & 0x00000010) == 0 yes Evaluation Count:357 | no Evaluation Count:0 |
| 0-357 |
6324 | { | - |
6325 | if (is_anchored(codestart, 0, cd->backref_map)) evaluated: is_anchored(codestart, 0, cd->backref_map) yes Evaluation Count:38 | yes Evaluation Count:319 |
| 38-319 |
6326 | re->options |= 0x00000010; executed: re->options |= 0x00000010; Execution Count:38 | 38 |
6327 | else | - |
6328 | { | - |
6329 | if (firstchar < 0) evaluated: firstchar < 0 yes Evaluation Count:81 | yes Evaluation Count:238 |
| 81-238 |
6330 | firstchar = find_firstassertedchar(codestart, 0); executed: firstchar = find_firstassertedchar(codestart, 0); Execution Count:81 | 81 |
6331 | if (firstchar >= 0) evaluated: firstchar >= 0 yes Evaluation Count:238 | yes Evaluation Count:81 |
| 81-238 |
6332 | { | - |
6333 | | - |
6334 | | - |
6335 | | - |
6336 | | - |
6337 | re->first_char = firstchar & 0xffff; | - |
6338 | | - |
6339 | | - |
6340 | if ((firstchar & 0x10000000l) != 0) evaluated: (firstchar & 0x10000000l) != 0 yes Evaluation Count:39 | yes Evaluation Count:199 |
| 39-199 |
6341 | { | - |
6342 | | - |
6343 | | - |
6344 | if (utf) partially evaluated: utf yes Evaluation Count:39 | no Evaluation Count:0 |
| 0-39 |
6345 | { | - |
6346 | if (re->first_char < 128) evaluated: re->first_char < 128 yes Evaluation Count:38 | yes Evaluation Count:1 |
| 1-38 |
6347 | { | - |
6348 | if (cd->fcc[re->first_char] != re->first_char) partially evaluated: cd->fcc[re->first_char] != re->first_char yes Evaluation Count:38 | no Evaluation Count:0 |
| 0-38 |
6349 | re->flags |= 0x0020; executed: re->flags |= 0x0020; Execution Count:38 | 38 |
6350 | } executed: } Execution Count:38 | 38 |
6351 | else if ((re->first_char + (_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(re->first_char) / 128] * 128 + (re->first_char) % 128])->other_case) != re->first_char) partially evaluated: (re->first_char + (_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(re->first_char) / 128] * 128 + (re->first_char) % 128])->other_case) != re->first_char yes Evaluation Count:1 | no Evaluation Count:0 |
| 0-1 |
6352 | re->flags |= 0x0020; executed: re->flags |= 0x0020; Execution Count:1 | 1 |
6353 | } | - |
6354 | else | - |
6355 | | - |
6356 | if (((re->first_char) <= 255u) never evaluated: ((re->first_char) <= 255u) | 0 |
6357 | && cd->fcc[re->first_char] != re->first_char) never evaluated: cd->fcc[re->first_char] != re->first_char | 0 |
6358 | re->flags |= 0x0020; never executed: re->flags |= 0x0020; | 0 |
6359 | } | - |
6360 | | - |
6361 | re->flags |= 0x0010; | - |
6362 | } executed: } Execution Count:238 | 238 |
6363 | else if (is_startline(codestart, 0, cd->backref_map)) evaluated: is_startline(codestart, 0, cd->backref_map) yes Evaluation Count:10 | yes Evaluation Count:71 |
| 10-71 |
6364 | re->flags |= 0x0100; executed: re->flags |= 0x0100; Execution Count:10 | 10 |
6365 | } | - |
6366 | } | - |
6367 | | - |
6368 | | - |
6369 | | - |
6370 | | - |
6371 | | - |
6372 | if (reqchar >= 0 && evaluated: reqchar >= 0 yes Evaluation Count:199 | yes Evaluation Count:158 |
| 158-199 |
6373 | ((re->options & 0x00000010) == 0 || (reqchar & 0x20000000l) != 0)) evaluated: (re->options & 0x00000010) == 0 yes Evaluation Count:164 | yes Evaluation Count:35 |
evaluated: (reqchar & 0x20000000l) != 0 yes Evaluation Count:24 | yes Evaluation Count:11 |
| 11-164 |
6374 | { | - |
6375 | | - |
6376 | | - |
6377 | | - |
6378 | | - |
6379 | re->req_char = reqchar & 0xffff; | - |
6380 | | - |
6381 | | - |
6382 | if ((reqchar & 0x10000000l) != 0) evaluated: (reqchar & 0x10000000l) != 0 yes Evaluation Count:20 | yes Evaluation Count:168 |
| 20-168 |
6383 | { | - |
6384 | | - |
6385 | | - |
6386 | if (utf) partially evaluated: utf yes Evaluation Count:20 | no Evaluation Count:0 |
| 0-20 |
6387 | { | - |
6388 | if (re->req_char < 128) evaluated: re->req_char < 128 yes Evaluation Count:18 | yes Evaluation Count:2 |
| 2-18 |
6389 | { | - |
6390 | if (cd->fcc[re->req_char] != re->req_char) partially evaluated: cd->fcc[re->req_char] != re->req_char yes Evaluation Count:18 | no Evaluation Count:0 |
| 0-18 |
6391 | re->flags |= 0x0080; executed: re->flags |= 0x0080; Execution Count:18 | 18 |
6392 | } executed: } Execution Count:18 | 18 |
6393 | else if ((re->req_char + (_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(re->req_char) / 128] * 128 + (re->req_char) % 128])->other_case) != re->req_char) partially evaluated: (re->req_char + (_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(re->req_char) / 128] * 128 + (re->req_char) % 128])->other_case) != re->req_char yes Evaluation Count:2 | no Evaluation Count:0 |
| 0-2 |
6394 | re->flags |= 0x0080; executed: re->flags |= 0x0080; Execution Count:2 | 2 |
6395 | } | - |
6396 | else | - |
6397 | | - |
6398 | if (((re->req_char) <= 255u) && cd->fcc[re->req_char] != re->req_char) never evaluated: ((re->req_char) <= 255u) never evaluated: cd->fcc[re->req_char] != re->req_char | 0 |
6399 | re->flags |= 0x0080; never executed: re->flags |= 0x0080; | 0 |
6400 | } | - |
6401 | | - |
6402 | re->flags |= 0x0040; | - |
6403 | } executed: } Execution Count:188 | 188 |
6404 | return (pcre16 *)re; executed: return (pcre16 *)re; Execution Count:357 | 357 |
6405 | | - |
6406 | } | - |
6407 | | - |
| | |