From fd6d954e95e016a78001e9bc12c4646ba8183e12 Mon Sep 17 00:00:00 2001 From: Mike Meffie Date: Sun, 15 Mar 2009 18:19:15 +0000 Subject: [PATCH] butc-xbsa-buffersize-20090315 LICENSE IPL10 FIXES 124425 restrict buffer size to allow for header space --- src/butc/dump.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/butc/dump.c b/src/butc/dump.c index e1aff6fb65..5c08b67f07 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;