mirror of
https://github.com/apache/nuttx.git
synced 2026-05-21 04:52:02 +08:00
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:
@@ -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++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user