mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-31 12:53:07 +02:00
Merge branch 'coverity-test-logging' into 'main'
gtestutils: Fix a potential NULL pointer dereference in g_test_log() See merge request GNOME/glib!3224
This commit is contained in:
commit
4dc99db8ad
@ -1214,13 +1214,16 @@ g_test_log (GTestLogType lbit,
|
|||||||
if (test_tap_log)
|
if (test_tap_log)
|
||||||
{
|
{
|
||||||
char *message = g_strdup (string1);
|
char *message = g_strdup (string1);
|
||||||
char *line = message;
|
|
||||||
|
|
||||||
while ((line = strchr (line, '\n')))
|
|
||||||
*(line++) = ' ';
|
|
||||||
|
|
||||||
if (message)
|
if (message)
|
||||||
message = g_strstrip (message);
|
{
|
||||||
|
char *line = message;
|
||||||
|
|
||||||
|
while ((line = strchr (line, '\n')))
|
||||||
|
*(line++) = ' ';
|
||||||
|
|
||||||
|
message = g_strstrip (message);
|
||||||
|
}
|
||||||
|
|
||||||
if (test_run_name && *test_run_name != '\0')
|
if (test_run_name && *test_run_name != '\0')
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user