This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=e9c502d6eb9a6c735d5ab5171934270efa3b42a1

commit e9c502d6eb9a6c735d5ab5171934270efa3b42a1 (HEAD -> main)
Author: Guillem Jover <[email protected]>
AuthorDate: Sat Nov 4 02:24:20 2023 +0100

    libcompat: Disable VLA usage for gettext.h
    
    The header has support for VLA usage depending on the compiler used.
    But we do not want to use it as it has a terrible failure mode on stack
    exhaustion, and we already enable warnings to catch its usage in the
    codebase.
---
 lib/compat/gettext.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/compat/gettext.h b/lib/compat/gettext.h
index 1caaaaddd..69cb4483a 100644
--- a/lib/compat/gettext.h
+++ b/lib/compat/gettext.h
@@ -171,9 +171,13 @@ npgettext_aux (const char *domain,
 
 #include <string.h>
 
+/* We do not want VLAs, which have a terrible failure mode on stack
+ * exhaustion. */
+#if 0
 #define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \
   (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \
    /* || __STDC_VERSION__ >= 199901L */ )
+#endif
 
 #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
 #include <stdlib.h>

-- 
Dpkg.Org's dpkg

Reply via email to