Skip to content

Commit 8d82bd7

Browse files
nuttxsxiaoxiang781216
authored andcommitted
wireless/wapi.c: Initialize variables to avoid abnormal
data when wapi get country code.
1 parent a7024ae commit 8d82bd7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

wireless/wapi/src/wapi.c

+1
Original file line numberDiff line numberDiff line change
@@ -911,6 +911,7 @@ static int wapi_country_cmd(int sock, int argc, FAR char **argv)
911911

912912
if (argc == 1)
913913
{
914+
memset(country, 0, sizeof(country));
914915
ret = wapi_get_country(sock, argv[0], country);
915916
if (ret >= 0)
916917
{

0 commit comments

Comments
 (0)