Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
159c9ad2
Commit
159c9ad2
authored
Sep 10, 2021
by
Abseil Team
Committed by
Derek Mauro
Sep 14, 2021
Browse files
Googletest export
Avoid segfault on null premature_exit_filepath. PiperOrigin-RevId: 395965853
parent
955c7f83
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
googletest/src/gtest.cc
googletest/src/gtest.cc
+1
-1
No files found.
googletest/src/gtest.cc
View file @
159c9ad2
...
...
@@ -5038,7 +5038,7 @@ class ScopedPrematureExitFile {
// create the file with a single "0" character in it. I/O
// errors are ignored as there's nothing better we can do and we
// don't want to fail the test because of this.
FILE
*
pfile
=
posix
::
FOpen
(
premature_exit_filepath
,
"w"
);
FILE
*
pfile
=
posix
::
FOpen
(
premature_exit_filepath
_
.
c_str
()
,
"w"
);
fwrite
(
"0"
,
1
,
1
,
pfile
);
fclose
(
pfile
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment