[Bugfix][T108][bug-view-1375]Fix the issue where sending instructions with fewer characters than the registered AT can still successfully return
Only Configure: No
Affected branch: GSW_V1453
Affected module: at
Is it affected on IC: only ASR
Self-test: yes
Doc Update: no
Change-Id: I1b0513f0695a5765042271ffbc0dfd1e1d9556e7
diff --git a/marvell/lte-telephony/apps/atcmd_server_ss/src/telcontroller.c b/marvell/lte-telephony/apps/atcmd_server_ss/src/telcontroller.c
index d80dfbc..28f02a0 100755
--- a/marvell/lte-telephony/apps/atcmd_server_ss/src/telcontroller.c
+++ b/marvell/lte-telephony/apps/atcmd_server_ss/src/telcontroller.c
@@ -3771,11 +3771,12 @@
if(strcmp(line_cut,white_list[i]) == 0)
{
ERRMSG(mbtk_check_extension_atcmd, "[%s]count %d,pass atcmd:%s",__FUNCTION__,i,line_cut);
+ free(line_cut);
return -1;
}
}
needleP =strstr(register_atcmd_buff,line_cut);
- if(NULL != needleP)
+ if(NULL != needleP && (needleP[strlen(line_cut)] == ';' || needleP[strlen(line_cut)] == '\0'))
{
ERRMSG(mbtk_check_extension_atcmd, "[%s] find atcmd:%s",__FUNCTION__,line_cut);
free(line_cut);