From: Jérémie Astor Date: Wed, 20 May 2020 15:53:12 +0000 (+0200) Subject: :wrench: Do not use is_reg when fuzzing X-Git-Tag: nightly~1536 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=6e44b15996349d213eb913286e756e32a1c32ffc;p=gwion.git :wrench: Do not use is_reg when fuzzing --- 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);