加强Maat_set_scan_status的输入参数检查。

This commit is contained in:
zhengchao
2016-09-07 11:42:41 +08:00
parent b5bde8453b
commit 0646607b91
2 changed files with 5 additions and 1 deletions

View File

@@ -1487,6 +1487,10 @@ int Maat_set_scan_status(Maat_feather_t feather,scan_status_t* mid,enum MAAT_SCA
switch(type)
{
case MAAT_SET_SCAN_DISTRICT:
if(value==NULL||size<=0)
{
return -1;
}
map_ret=map_str2int(_feather->scanner->district_map,(const char*)value,&(_mid->district_id));
if(map_ret<0)
{