diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-02-20 11:11:12 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-02-20 11:11:12 -0300 |
| commit | f53caf1f863f140de1c1af51906e658c9fb7d7d6 (patch) | |
| tree | 440889bf7622e7706e6bebe91d7d13ade83a89cc /makefile | |
| parent | cc583a17df76a363e419c960d72422169fae816d (diff) | |
| download | lpeg-f53caf1f863f140de1c1af51906e658c9fb7d7d6.tar.gz lpeg-f53caf1f863f140de1c1af51906e658c9fb7d7d6.tar.bz2 lpeg-f53caf1f863f140de1c1af51906e658c9fb7d7d6.zip | |
Avoid stack overflow when handling nested captures
The C code uses recursion to handle nested captures, so a too deep
nesting could create a stack overflow. The fix limits the handling
of nested captures to 'MAXRECLEVEL' (default is 200 levels).
Diffstat (limited to 'makefile')
| -rw-r--r-- | makefile | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -29,11 +29,11 @@ FILES = lpvm.o lpcap.o lptree.o lpcode.o lpprint.o | |||
| 29 | 29 | ||
| 30 | # For Linux | 30 | # For Linux |
| 31 | linux: | 31 | linux: |
| 32 | make lpeg.so "DLLFLAGS = -shared -fPIC" | 32 | $(MAKE) lpeg.so "DLLFLAGS = -shared -fPIC" |
| 33 | 33 | ||
| 34 | # For Mac OS | 34 | # For Mac OS |
| 35 | macosx: | 35 | macosx: |
| 36 | make lpeg.so "DLLFLAGS = -bundle -undefined dynamic_lookup" | 36 | $(MAKE) lpeg.so "DLLFLAGS = -bundle -undefined dynamic_lookup" |
| 37 | 37 | ||
| 38 | lpeg.so: $(FILES) | 38 | lpeg.so: $(FILES) |
| 39 | env $(CC) $(DLLFLAGS) $(FILES) -o lpeg.so | 39 | env $(CC) $(DLLFLAGS) $(FILES) -o lpeg.so |
