diff --git a/arch/sim/src/sim/sim_wifidriver.c b/arch/sim/src/sim/sim_wifidriver.c index 3681e5e7f5..dc6f6e2d9f 100644 --- a/arch/sim/src/sim/sim_wifidriver.c +++ b/arch/sim/src/sim/sim_wifidriver.c @@ -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++) {