aboutsummaryrefslogtreecommitdiff
path: root/gcc/diagnostic-format-json.cc
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2022-05-16 09:48:27 +0200
committerMartin Liska <mliska@suse.cz>2022-05-16 09:53:33 +0200
commitec69db6be6912e45fa5f54f2d231d56e52612f1d (patch)
tree18bf834e0382f251d0f422f07eb34096251b4e25 /gcc/diagnostic-format-json.cc
parent9a53101caadae1b5c8d791d247b05268ee4f7f92 (diff)
downloadgcc-ec69db6be6912e45fa5f54f2d231d56e52612f1d.zip
gcc-ec69db6be6912e45fa5f54f2d231d56e52612f1d.tar.gz
gcc-ec69db6be6912e45fa5f54f2d231d56e52612f1d.tar.bz2
Fix ubsan error in opts-global.cc
Fixes: opts-global.cc:75:15: runtime error: store to address 0x00000bc9be70 with insufficient space for an object of type 'char' which happens when mask == 0, len == 0 and we allocate zero elements. Eventually, result[0] is called which triggers the UBSAN. gcc/ChangeLog: * opts-global.cc (write_langs): Allocate at least one byte.
Diffstat (limited to 'gcc/diagnostic-format-json.cc')
0 files changed, 0 insertions, 0 deletions