From 6e44b15996349d213eb913286e756e32a1c32ffc Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Wed, 20 May 2020 17:53:12 +0200 Subject: [PATCH] :wrench: Do not use is_reg when fuzzing --- src/compile.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/compile.c b/src/compile.c index 13e717b9..6aca68ba 100644 --- a/src/compile.c +++ b/src/compile.c @@ -87,10 +87,12 @@ ANN static m_bool is_reg(const m_str path) { ANN static inline m_bool compiler_open(MemPool p, struct Compiler* c) { char name[strlen(c->name) + 1]; strcpy(name, c->name); -// if(c->type == COMPILE_FILE && !is_reg(name)) { -// gw_err(_("'%s': is a not a regular file\n"), name); -// return GW_ERROR; -// } +#ifndef __FUZZING__ + if(c->type == COMPILE_FILE && !is_reg(name)) { + gw_err(_("'%s': is a not a regular file\n"), name); + return GW_ERROR; + } +#endif if(_compiler_open(c) < 0) { compiler_error(p, c); gw_err(_("can't open '%s'\n"), name); -- 2.43.0