[PATCH] D68775: [libFuzzer] Fix fd check in DupAndCloseStderr.
Marco Vanotti via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 21 15:34:01 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rG16d9f44fd154: [libFuzzer] Fix fd check in DupAndCloseStderr. (authored by charco).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68775/new/
https://reviews.llvm.org/D68775
Files:
compiler-rt/lib/fuzzer/FuzzerIO.cpp
Index: compiler-rt/lib/fuzzer/FuzzerIO.cpp
===================================================================
--- compiler-rt/lib/fuzzer/FuzzerIO.cpp
+++ compiler-rt/lib/fuzzer/FuzzerIO.cpp
@@ -111,7 +111,7 @@
void DupAndCloseStderr() {
int OutputFd = DuplicateFile(2);
- if (OutputFd > 0) {
+ if (OutputFd >= 0) {
FILE *NewOutputFile = OpenFile(OutputFd, "w");
if (NewOutputFile) {
OutputFile = NewOutputFile;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68775.230550.patch
Type: text/x-patch
Size: 437 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191121/1e9001fc/attachment.bin>
More information about the llvm-commits
mailing list