(execute): Prompted for a missing argument, but then passed a null
pointer to prexec() instead. Some systems (GNU, Windows) deal gracefully with printing null strings, others crash.
This commit is contained in:
parent
a877480082
commit
bd0d5c10b6
1 changed files with 2 additions and 4 deletions
|
@ -278,13 +278,11 @@ execute(void)
|
||||||
failed = 0;
|
failed = 0;
|
||||||
redir = NULL;
|
redir = NULL;
|
||||||
|
|
||||||
|
/* FIXME should use raw argument here, to support UTF-8 file names */
|
||||||
p = getstarg(player->argp[1], "File? ", buf);
|
p = getstarg(player->argp[1], "File? ", buf);
|
||||||
|
|
||||||
if (p == NULL || *p == '\0')
|
if (p == NULL || *p == '\0')
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
prexec(p);
|
||||||
/* FIXME should use raw argument here, to support UTF-8 file names */
|
|
||||||
prexec(player->argp[1]);
|
|
||||||
|
|
||||||
while (!failed && status()) {
|
while (!failed && status()) {
|
||||||
if (recvclient(buf, sizeof(buf)) < 0)
|
if (recvclient(buf, sizeof(buf)) < 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue