Updated file anstohttp.c to fixed the bug raised in issue #SICS378, checked the number of the arguments passed on to the hmm command to aovid a crash.

r2880 | jgn | 2010-01-27 14:18:00 +1100 (Wed, 27 Jan 2010) | 2 lines
This commit is contained in:
Jing Chen
2010-01-27 14:18:00 +11:00
committed by Douglas Clowes
parent eedaf4b675
commit ce113f26fd

View File

@@ -952,6 +952,16 @@ pHistDriver CreateAnstoHttpDriver(pStringDict pOption){
{
pHistMem self = NULL;
/* check arguments */
char pBueffel[512];
if(argc < 2)
{
sprintf(pBueffel,"ERROR: no arguments specified to %s, shall porvide an argument to hmm.", argv[0]);
SCWrite(pCon,pBueffel,eError);
return 0;
}
self = (pHistMem)pData;
if(strcmp(argv[1],"pause") == 0) {
if(!SCMatchRights(pCon,usUser)) {