mirror of https://github.com/YosysHQ/abc.git
Add support for WASI platform in cmdCheckShellEscape.
Since cmdCheckShellEscape doesn't actually report failure in any way, this code simulates a situation where system() never succeeds.
This commit is contained in:
parent
09607e9055
commit
eea20ff466
|
|
@ -52,6 +52,9 @@ int cmdCheckShellEscape( Abc_Frame_t * pAbc, int argc, char ** argv)
|
|||
int RetValue;
|
||||
if (argv[0][0] == '!')
|
||||
{
|
||||
#if defined(__wasm)
|
||||
RetValue = -1;
|
||||
#else
|
||||
const int size = 4096;
|
||||
int i;
|
||||
char * buffer = ABC_ALLOC(char, 10000);
|
||||
|
|
@ -70,7 +73,7 @@ int cmdCheckShellEscape( Abc_Frame_t * pAbc, int argc, char ** argv)
|
|||
// the parts, we lose information. So a command like
|
||||
// `!ls "file name"` will be sent to the system as
|
||||
// `ls file name` which is a BUG
|
||||
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue