From: Wilfried Göesgens Date: Fri, 21 May 2010 19:25:42 +0000 (+0000) Subject: * StrBufReadBLOBBuffered(): tell read to give us as much as our buffer can bear,... X-Git-Tag: v7.86~192 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=dfdef175f5568950167ed314a7857aff3691a2de * StrBufReadBLOBBuffered(): tell read to give us as much as our buffer can bear, not as much as we want to read --- diff --git a/libcitadel/lib/stringbuf.c b/libcitadel/lib/stringbuf.c index b3c3fefb9..97be33b15 100644 --- a/libcitadel/lib/stringbuf.c +++ b/libcitadel/lib/stringbuf.c @@ -3633,7 +3633,7 @@ int StrBufReadBLOBBuffered(StrBuf *Blob, } rlen = read(*fd, ptr, - nBytes - nRead); + IOBuf->BufSize - (ptr - IOBuf->buf)); if (rlen == -1) { close(*fd); *fd = -1;