diff --git a/components/console/linenoise/linenoise.c b/components/console/linenoise/linenoise.c index 7674cbf..ee7f3d1 100644 --- a/components/console/linenoise/linenoise.c +++ b/components/console/linenoise/linenoise.c @@ -1206,6 +1206,10 @@ int linenoiseProbe() { if (cb < 0) { continue; } + if (read_bytes == 0 && c != '\x1b') { + /* invalid response */ + break; + } read_bytes += cb; } /* Restore old mode */