| 92 |
|
|
| 93 |
#define COMPILE_WORK_SIZE (4096) |
#define COMPILE_WORK_SIZE (4096) |
| 94 |
|
|
| 95 |
|
/* The overrun tests check for a slightly smaller size so that they detect the |
| 96 |
|
overrun before it actually does run off the end of the data block. */ |
| 97 |
|
|
| 98 |
|
#define WORK_SIZE_CHECK (COMPILE_WORK_SIZE - 100) |
| 99 |
|
|
| 100 |
|
|
| 101 |
/* Table for handling escaped characters in the range '0'-'z'. Positive returns |
/* Table for handling escaped characters in the range '0'-'z'. Positive returns |
| 102 |
are simple data values; negative values are for special things like \d and so |
are simple data values; negative values are for special things like \d and so |
| 2765 |
#ifdef PCRE_DEBUG |
#ifdef PCRE_DEBUG |
| 2766 |
if (code > cd->hwm) cd->hwm = code; /* High water info */ |
if (code > cd->hwm) cd->hwm = code; /* High water info */ |
| 2767 |
#endif |
#endif |
| 2768 |
if (code > cd->start_workspace + COMPILE_WORK_SIZE) /* Check for overrun */ |
if (code > cd->start_workspace + WORK_SIZE_CHECK) /* Check for overrun */ |
| 2769 |
{ |
{ |
| 2770 |
*errorcodeptr = ERR52; |
*errorcodeptr = ERR52; |
| 2771 |
goto FAILED; |
goto FAILED; |
| 2814 |
/* In the real compile phase, just check the workspace used by the forward |
/* In the real compile phase, just check the workspace used by the forward |
| 2815 |
reference list. */ |
reference list. */ |
| 2816 |
|
|
| 2817 |
else if (cd->hwm > cd->start_workspace + COMPILE_WORK_SIZE) |
else if (cd->hwm > cd->start_workspace + WORK_SIZE_CHECK) |
| 2818 |
{ |
{ |
| 2819 |
*errorcodeptr = ERR52; |
*errorcodeptr = ERR52; |
| 2820 |
goto FAILED; |
goto FAILED; |