diff options
Diffstat (limited to 'tests/libqtest.c')
-rw-r--r-- | tests/libqtest.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/libqtest.c b/tests/libqtest.c index 1d73fd1953..071b6be521 100644 --- a/tests/libqtest.c +++ b/tests/libqtest.c @@ -291,6 +291,11 @@ void qtest_qmp(QTestState *s, const char *fmt, ...) continue; } + if (len == -1 || len == 0) { + fprintf(stderr, "Broken pipe\n"); + exit(1); + } + switch (c) { case '{': nesting++; |