indent/indent-CVE-2024-0911.patch

17 lines
463 B
Diff
Raw Normal View History

diff --git a/src/output.c b/src/output.c
index ee01bcc..17eee6e 100644
--- a/src/output.c
+++ b/src/output.c
@@ -290,7 +290,7 @@ void set_buf_break (
/* Did we just parse a bracket that will be put on the next line
* by this line break? */
- if ((*token == '(') || (*token == '['))
+ if (level > 0 && ((*token == '(') || (*token == '[')))
{
--level; /* then don't take it into account */
}
--
2.43.0