Skip to content

Commit

Permalink
Fail catastrophically if a read with no segment is requested; fix inc…
Browse files Browse the repository at this point in the history
…orrect cast that would fail to load a read in a blob bigger than 4 GB.
  • Loading branch information
brianwalenz committed Sep 5, 2020
1 parent 7ccc151 commit cd9ef20
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/stores/sqStoreBlob.C
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cd9ef20

Please sign in to comment.