summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYuki Izumi <ashe@kivikakk.ee>2017-07-12 18:37:48 +1000
committerYuki Izumi <ashe@kivikakk.ee>2017-07-12 18:40:25 +1000
commit45f4fc9b917c11221aa03e70a41e3046335a235d (patch)
tree1f44fcc1ca77feb819b1d9f015c2bb7b74dec1a1 /src
parent88c8ad11b687c756146d27d31b5a30f3cf13a75e (diff)
> 32 nested balanced parens in a link is bananas
Diffstat (limited to 'src')
-rw-r--r--src/inlines.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/inlines.c b/src/inlines.c
index b864e12..c95809c 100644
--- a/src/inlines.c
+++ b/src/inlines.c
@@ -850,6 +850,8 @@ static bufsize_t manual_scan_link_url(cmark_chunk *input, bufsize_t offset) {
else if (input->data[i] == '(') {
++nb_p;
++i;
+ if (nb_p > 32)
+ return -1;
} else if (input->data[i] == ')') {
if (nb_p == 0)
break;