From cd9ef2012c6147e23de880987e9aafafc5f21c27 Mon Sep 17 00:00:00 2001 From: "Brian P. Walenz" Date: Fri, 4 Sep 2020 15:07:58 -0400 Subject: [PATCH] Fail catastrophically if a read with no segment is requested; fix incorrect cast that would fail to load a read in a blob bigger than 4 GB. --- src/stores/sqStoreBlob.C | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/stores/sqStoreBlob.C b/src/stores/sqStoreBlob.C index cb548d43e..61b566920 100644 --- a/src/stores/sqStoreBlob.C +++ b/src/stores/sqStoreBlob.C @@ -102,7 +102,9 @@ sqStoreBlobReader::~sqStoreBlobReader() { readBuffer * sqStoreBlobReader::getBuffer(sqReadMeta *meta) { uint32 file = meta->sqRead_mSegm(); - uint32 posn = meta->sqRead_mByte(); + uint64 posn = meta->sqRead_mByte(); + + assert(file > 0); while (_buffersMax <= file) resizeArray(_buffers, _buffersMax, _buffersMax, _buffersMax * 2, resizeArray_copyData | resizeArray_clearNew);