From 95c63f959af14d46855b1bf206ef6f28d5341234 Mon Sep 17 00:00:00 2001 From: Pompolic <pompolic@special-circumstanc.es> Date: Thu, 23 Dec 2021 20:34:47 +0100 Subject: [PATCH] Reformat/rephrase comments --- pdf.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pdf.c b/pdf.c index eae4b04..2cb5cd9 100644 --- a/pdf.c +++ b/pdf.c @@ -1169,11 +1169,13 @@ act_rldstring(const HParseResult *p, void *u) /* * The following functions implement a fix for being able to exhaust memory by nesting strings, objects and dicts too deeply. - * A counter in aux for each type is incremented on each opening token, and decremented on each closing token. The counter is not decremented when it is 0 to avoid underflow. - * - * The counter is global across the document (but respects document structure, e.g. parentheses in streams don't count, unless for some reason they're parsed with the lparen rule.) - * The validations make the parse fail if this nesting depth is exceeded. Because currently there are no diagnostic messages, this can probably result in unexpected parses. + * A counter in aux (separately for each type of nesting) is incremented on each opening token, and decremented on each closing token. + * The counters are not decremented when it is 0 to avoid underflow. * + * The counters are global across the document (but respect document structure, + * e.g. parentheses in streams don't count, unless for some reason they're parsed with the lparen rule.) + * The validations make the parse fail if this nesting depth is exceeded. + * Because currently there are no diagnostic messages, this can probably result in unexpected parses. */ #define PAREN_MAX_NEST_DEPTH 256 -- GitLab