mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
fix segfault
This commit is contained in:
parent
ae5b6fa169
commit
8ebc44ee81
1 changed files with 4 additions and 2 deletions
|
@ -62,9 +62,11 @@ main_loop(char *script_cmds_file, char *script_cmd, bool pm3_present) {
|
||||||
|
|
||||||
char *cmd = NULL;
|
char *cmd = NULL;
|
||||||
bool execCommand = (script_cmd != NULL);
|
bool execCommand = (script_cmd != NULL);
|
||||||
uint16_t script_cmd_len = strlen(script_cmd);
|
uint16_t script_cmd_len = 0;
|
||||||
if (execCommand)
|
if (execCommand) {
|
||||||
|
script_cmd_len = strlen(script_cmd);
|
||||||
strcreplace(script_cmd, script_cmd_len, ';', '\0');
|
strcreplace(script_cmd, script_cmd_len, ';', '\0');
|
||||||
|
}
|
||||||
bool stdinOnPipe = !isatty(STDIN_FILENO);
|
bool stdinOnPipe = !isatty(STDIN_FILENO);
|
||||||
FILE *sf = NULL;
|
FILE *sf = NULL;
|
||||||
char script_cmd_buf[256] = {0x00}; // iceman, needs lua script the same file_path_buffer as the rest
|
char script_cmd_buf[256] = {0x00}; // iceman, needs lua script the same file_path_buffer as the rest
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue