Plug possible snprintf overflow in lto-wrapper.
authorAldy Hernandez <aldyh@redhat.com>
Tue, 28 Sep 2021 13:54:20 +0000 (15:54 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Thu, 30 Sep 2021 07:54:16 +0000 (09:54 +0200)
commitf5440ac7ad535edcf143a877c3da11a41cbf2c37
tree50900216027ba0110ee7787e2b6e1da6ab0906c6
parentb38a4bd10249b5070ea1f4708a0fd228df268c26
Plug possible snprintf overflow in lto-wrapper.

My upcoming improvements to the DOM threader triggered a warning in
this code.  It looks like the format string is ".ltrans%u.ltrans", but
we're only writing a max of ".ltrans" + whatever the MAX_INT is here.

Tested on x86-64 Linux.

gcc/ChangeLog:

* lto-wrapper.c (run_gcc): Plug snprintf overflow.
gcc/lto-wrapper.c