Skip to content

Commit 7bd54e3

Browse files
tyler92kimkulling
andauthored
Disable logs for fuzzer by default (assimp#5938)
Co-authored-by: Kim Kulling <[email protected]>
1 parent 258cdfd commit 7bd54e3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

fuzz/assimp_fuzzer.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4747
using namespace Assimp;
4848

4949
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t dataSize) {
50+
#ifdef _DEBUG
5051
aiLogStream stream = aiGetPredefinedLogStream(aiDefaultLogStream_STDOUT, nullptr);
5152
aiAttachLogStream(&stream);
53+
#endif
5254

5355
Importer importer;
5456
const aiScene *sc = importer.ReadFileFromMemory(data, dataSize,
@@ -61,7 +63,9 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t dataSize) {
6163
Exporter exporter;
6264
exporter.ExportToBlob(sc, "fbx");
6365

66+
#ifdef _DEBUG
6467
aiDetachLogStream(&stream);
68+
#endif
6569

6670
return 0;
6771
}

0 commit comments

Comments
 (0)