sim/wifidriver: Fix the scan error.
Using the uninitialized buffer causes the out of bounds. Add a terminator for the rbuf. Signed-off-by: liqinhui <liqinhui@xiaomi.com>
This commit is contained in:
parent
fc80c70205
commit
66b11d8940
@ -594,6 +594,10 @@ get_scan:
|
||||
goto get_scan;
|
||||
}
|
||||
|
||||
/* Add a terminator for the rbuf */
|
||||
|
||||
rbuf[ret] = '\0';
|
||||
|
||||
ret = -EAGAIN;
|
||||
for (p = rbuf; *p != '\0'; p++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user