extmod/re1.5: Upgrade to v0.8.2, adds hook for stack overflow checking.
parent
2f7827ba8f
commit
c9a0b2a818
|
@ -48,6 +48,9 @@ void printre(Regexp*);
|
||||||
#ifndef re1_5_fatal
|
#ifndef re1_5_fatal
|
||||||
void re1_5_fatal(char*);
|
void re1_5_fatal(char*);
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef re1_5_stack_chk
|
||||||
|
#define re1_5_stack_chk()
|
||||||
|
#endif
|
||||||
void *mal(int);
|
void *mal(int);
|
||||||
|
|
||||||
struct Prog
|
struct Prog
|
||||||
|
|
|
@ -9,7 +9,9 @@ recursiveloop(char *pc, const char *sp, Subject *input, const char **subp, int n
|
||||||
{
|
{
|
||||||
const char *old;
|
const char *old;
|
||||||
int off;
|
int off;
|
||||||
|
|
||||||
|
re1_5_stack_chk();
|
||||||
|
|
||||||
for(;;) {
|
for(;;) {
|
||||||
if(inst_is_consumer(*pc)) {
|
if(inst_is_consumer(*pc)) {
|
||||||
// If we need to match a character, but there's none left, it's fail
|
// If we need to match a character, but there's none left, it's fail
|
||||||
|
|
Loading…
Reference in New Issue