aboutsummaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-02-20 11:11:12 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-02-20 11:11:12 -0300
commitf53caf1f863f140de1c1af51906e658c9fb7d7d6 (patch)
tree440889bf7622e7706e6bebe91d7d13ade83a89cc /makefile
parentcc583a17df76a363e419c960d72422169fae816d (diff)
downloadlpeg-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--makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/makefile b/makefile
index d803c12..9518034 100644
--- a/makefile
+++ b/makefile
@@ -29,11 +29,11 @@ FILES = lpvm.o lpcap.o lptree.o lpcode.o lpprint.o
29 29
30# For Linux 30# For Linux
31linux: 31linux:
32 make lpeg.so "DLLFLAGS = -shared -fPIC" 32 $(MAKE) lpeg.so "DLLFLAGS = -shared -fPIC"
33 33
34# For Mac OS 34# For Mac OS
35macosx: 35macosx:
36 make lpeg.so "DLLFLAGS = -bundle -undefined dynamic_lookup" 36 $(MAKE) lpeg.so "DLLFLAGS = -bundle -undefined dynamic_lookup"
37 37
38lpeg.so: $(FILES) 38lpeg.so: $(FILES)
39 env $(CC) $(DLLFLAGS) $(FILES) -o lpeg.so 39 env $(CC) $(DLLFLAGS) $(FILES) -o lpeg.so