gtest: backport ansi color fix
authorDavid Heidelberg <david.heidelberg@collabora.com>
Tue, 25 Jul 2023 22:58:06 +0000 (00:58 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 18 Aug 2023 21:33:14 +0000 (21:33 +0000)
commit05cb55abe8433483a3295f375cdf8b02876007eb
tree63cd339938c56d3abbacf1caf0ddee5510094f7a
parent798becf2da9914e032bd18e4c6a36df9ce079ee8
gtest: backport ansi color fix

Fixes ubsan runs for Mesa3D.

Adds prevents from returning
nullptr by choosing default color.

Upstream PR: https://github.com/google/googletest/pull/4322

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9404
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24783>
src/gtest/src/gtest.cc