File indent-CVE-2024-0911.patch of Package indent

Index: indent-2.2.11/src/output.c
===================================================================
--- indent-2.2.11.orig/src/output.c
+++ indent-2.2.11/src/output.c
@@ -291,7 +291,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 */
     }
openSUSE Build Service is sponsored by