Take more care with a NULL reader1 or writer1 buf.

This commit is contained in:
Nigel Tao committed 2017-09-23 15:32:42 +10:00
1 parent 10b7d5a031
commit 7b6f7384d1
6 files changed
+28 -21

No files matched your search

+1 -1
View File
@@ -12,7 +12,7 @@ short_read_qnameq:
// TODO: is ptr_to_len the right check?
if (a_qnameq.limit.ptr_to_len) {
status = qPKGPREFIXqSUSPENSION_LIMITED_READ;
} else if (a_qnameq.buf->closed) {
} else if (a_qnameq.buf && a_qnameq.buf->closed) {
status = qPKGPREFIXqERROR_UNEXPECTED_EOF;
goto exit;
} else {