Add some sanity checks.

SVN revision: 30285
This commit is contained in:
Kim Woelders 2007-06-09 14:27:55 +00:00
parent ba980827b9
commit 8d645158b9
1 changed files with 3 additions and 2 deletions

View File

@ -1650,7 +1650,8 @@ HandleIPC(const char *params, Client * c)
cmd[0] = 0;
num = 0;
sscanf(params, "%100s %n", cmd, &num);
if (params)
sscanf(params, "%100s %n", cmd, &num);
prm = (num > 0 && params[num]) ? params + num : NULL;
lst = IPC_GetList(&num);
@ -1668,7 +1669,7 @@ HandleIPC(const char *params, Client * c)
break;
}
if (!ok)
if (!ok && params)
ok = IPC_Compat(params);
IpcPrintFlush(c);