diff --git a/src/inlines.c b/src/inlines.c index 2f907b185..e30c2affe 100644 --- a/src/inlines.c +++ b/src/inlines.c @@ -871,6 +871,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;