breakpad/src
Marc Gonzalez 0d0354463e libdisasm: Widen STRNCATF temp buffer
The _tmp buffer used in STRNCATF is too small for several callers,
which might lead to truncated output in some situations.

For example, GCC 11 warns:

src/third_party/libdisasm/x86_format.c:899:40: warning: ‘%s’ directive output may be truncated writing up to 63 bytes into a region of size 32 [-Wformat-truncation=]
  899 |                         STRNCATF( buf, "%s:", str, len );
      |                                        ^~~~~  ~~~
src/third_party/libdisasm/x86_format.c:34:38: note: in definition of macro ‘STRNCATF’
   34 |         snprintf( _tmp, sizeof _tmp, fmt, data );   \
      |                                      ^~~
src/third_party/libdisasm/x86_format.c:899:41: note: format string is defined here
  899 |                         STRNCATF( buf, "%s:", str, len );
      |                                         ^~
In file included from /usr/include/stdio.h:894,
                 from src/third_party/libdisasm/x86_format.c:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:71:10: note: ‘__builtin___snprintf_chk’ output between 2 and 65 bytes into a destination of size 32
   71 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   72 |                                    __glibc_objsize (__s), __fmt,
      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   73 |                                    __va_arg_pack ());
      |                                    ~~~~~~~~~~~~~~~~~

Change-Id: Ia876e288bf9629f2c72db3faf2287c7940924ea0
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4668735
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2023-08-02 14:55:51 +00:00
..
client Modify RISCV minidump context to match Crashpad 2023-05-23 15:24:16 +00:00
common Add support for zstd compressed sections to dump_syms 2023-07-27 18:14:10 +00:00
google_breakpad Modify RISCV minidump context to match Crashpad 2023-05-23 15:24:16 +00:00
processor [Breakpad] Fix hex formatting for MinidumpCrashpadInfo::Print() 2023-05-26 16:34:47 +00:00
third_party libdisasm: Widen STRNCATF temp buffer 2023-08-02 14:55:51 +00:00
tools Modify RISCV minidump context to match Crashpad 2023-05-23 15:24:16 +00:00
breakpad_googletest_includes.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
config.h.in Add support for zstd compressed sections to dump_syms 2023-07-27 18:14:10 +00:00