From: Mike Meffie Date: Sun, 15 Mar 2009 18:19:25 +0000 (+0000) Subject: DEVEL15-butc-xbsa-buffersize-20090315 X-Git-Tag: openafs-devel-1_5_58~114 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=84e1da3b2ce2e7b73357506ae4c58abbf16de77f;p=packages%2Fo%2Fopenafs.git DEVEL15-butc-xbsa-buffersize-20090315 LICENSE IPL10 FIXES 124425 restrict buffer size to allow for header space (cherry picked from commit fd6d954e95e016a78001e9bc12c4646ba8183e12) --- diff --git a/src/butc/dump.c b/src/butc/dump.c index e1aff6fb6..5c08b67f0 100644 --- a/src/butc/dump.c +++ b/src/butc/dump.c @@ -358,6 +358,13 @@ dumpVolume(struct tc_dumpDesc * curDump, struct dumpRock * dparamsPtr) } } +#ifdef xbsa + /* Set aside space for the trailing volume header when using large buffers. */ + if (XBSAMAXBUFFER < toread + sizeof(hostVolumeHeader)) { + toread = XBSAMAXBUFFER - sizeof(hostVolumeHeader); + } +#endif + /* Read some volume data. */ if (fragmentvolume) { bytesread = 0;