--- samba-4.13.2/source3/modules/vfs_virusfilter_utils.c.orig 2020-07-09 11:33:56.000000000 +0200 +++ samba-4.13.2/source3/modules/vfs_virusfilter_utils.c 2020-12-03 19:40:44.137740873 +0100 @@ -583,6 +583,7 @@ */ pending = tstream_pending_bytes(io_h->stream); if (pending < 0) { + ok = false; DBG_ERR("tstream_pending_bytes failed (%s).\n", strerror(errno)); goto finish; @@ -597,6 +598,7 @@ (sizeof(io_h->r_buffer) - io_h->r_len)); if (read_size == 0) { + ok = false; /* Buffer is full with no EOL. Error out. */ DBG_ERR("Line buffer full.\n"); goto finish; @@ -612,6 +614,7 @@ &iov, 1); if (req == NULL) { + ok = false; DBG_ERR("out of memory.\n"); goto finish; } @@ -642,6 +645,7 @@ * EPIPE may be success so, don't exit. */ if (*perror != 0 && *perror != EPIPE) { + ok = false; DBG_DEBUG("Error %s\n", strerror((int)*perror)); errno = (int)*perror; goto finish;