qcacld-3.0: Add check for validity of COUNTRY driver cmd

When the driver command COUNTRY is issued from the userspace, the
command and the parameter is copied from the user in hdd_driver_command()
where it is then processed by hdd_drv_cmd_process() and then passed on
to the handler, in this case, drv_cmd_country(). The command parameter
passed is then parsed for the country code appended after the string
"COUNTRY". In the case the command is passed without any country code,
there may occur an out of bounds index access in the function
drv_cmd_country(). The parsed parameters in this function are accessed
without any validity check.

Add a validity check to verify that the command is passed with country
code parameters to prevent access of out of bound index.

Change-Id: I03c372796ed7cd62e54a0acdf237069be076ee2c
CRs-Fixed: 2242617
1 file changed