Skip to content

Commit

Permalink
[MTM-31464][fix]srreporter: Revert the previous fix and enlarge the b…
Browse files Browse the repository at this point in the history
…uffer size read by readPage()
  • Loading branch information
rina23q committed Apr 7, 2020
1 parent 1a0400b commit 1c6c0d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/srreporter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,12 @@ class _BFPager: public _Pager
return s;
}

char buf[SR_FILEBUF_PAGE_SIZE];
char buf[SR_FILEBUF_PAGE_SIZE + 1];
ifstream in(fn, ios::binary);
const auto flag = pcb.front().flag;
for (size_t i = 0; i < pcb.size() && flag == pcb[i].flag; ++i)
{
const auto offset = pcb[i].offset;
const auto offset = pcb[i].offset + 1;
if (readPage(in, pcb[i].index, buf, offset) != offset)
{
break;
Expand Down

0 comments on commit 1c6c0d1

Please sign in to comment.