STABLE14-butc-xbsa-buffersize-20090315

LICENSE IPL10
FIXES 124425

restrict buffer size to allow for header space


(cherry picked from commit fd6d954e95)
This commit is contained in:
Mike Meffie 2009-03-15 18:19:37 +00:00 committed by Derrick Brashear
parent c943130b7f
commit 027e968221

View File

@ -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;