(lrange, shoo, execute): Buffer passed to getstarg() was too small.
Player could overrun it!
This commit is contained in:
parent
58a0d40777
commit
968e754447
3 changed files with 7 additions and 7 deletions
|
@ -76,9 +76,9 @@ lrange(void)
|
||||||
struct lndstr land;
|
struct lndstr land;
|
||||||
struct lchrstr *lcp;
|
struct lchrstr *lcp;
|
||||||
int i;
|
int i;
|
||||||
s_char *p;
|
char *p;
|
||||||
s_char prompt[128];
|
char prompt[128];
|
||||||
s_char buf[128];
|
char buf[1024];
|
||||||
|
|
||||||
if (!snxtitem(&np, EF_LAND, player->argp[1]))
|
if (!snxtitem(&np, EF_LAND, player->argp[1]))
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
|
|
@ -57,10 +57,10 @@ shoo(void)
|
||||||
struct ichrstr *ip;
|
struct ichrstr *ip;
|
||||||
struct lndstr land;
|
struct lndstr land;
|
||||||
int targets;
|
int targets;
|
||||||
s_char *p;
|
char *p;
|
||||||
int mil, nsec;
|
int mil, nsec;
|
||||||
s_char prompt[128];
|
char prompt[128];
|
||||||
s_char buf[128];
|
char buf[1024];
|
||||||
|
|
||||||
ip = whatitem(player->argp[1], "Shoot what <civ or uw> ");
|
ip = whatitem(player->argp[1], "Shoot what <civ or uw> ");
|
||||||
if (ip == 0 || (ip->i_vtype != I_CIVIL && ip->i_vtype != I_UW))
|
if (ip == 0 || (ip->i_vtype != I_CIVIL && ip->i_vtype != I_UW))
|
||||||
|
|
|
@ -303,7 +303,7 @@ status(void)
|
||||||
int
|
int
|
||||||
execute(void)
|
execute(void)
|
||||||
{
|
{
|
||||||
char buf[512];
|
char buf[1024];
|
||||||
int failed;
|
int failed;
|
||||||
char *p;
|
char *p;
|
||||||
char *redir;
|
char *redir;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue