Skip to content

Commit

Permalink
invalid read of mutationnel parameter in reftable
Browse files Browse the repository at this point in the history
  • Loading branch information
fradav committed Mar 31, 2020
1 parent 3887662 commit 8ecc37e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/readreftable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ Reftable<MatrixXd> readreftable(string headerpath, string reftablepath, size_t N
}
for(auto j = 0; j < parambyscenh[scen].size(); j++)
params(i,parambyscenh[scen][j] - 1) = lparam[j];
for(auto j = 0; j < nmutparams; j++)
params(i,j) = lparam[nparam[scen] - nmutparams + j - 1];
for(auto j = nparam[scen] - nmutparams; j < nparam[scen]; j++)
params(i,j) = lparam[j];
for(auto j = 0; j < nstat; j++) {
float r;
reftableStream.read(reinterpret_cast<char *>(&r),4);
Expand Down Expand Up @@ -279,8 +279,8 @@ Reftable<MatrixXd> readreftable_scen(string headerpath, string reftablepath, siz
}
for(auto j = 0; j < parambyscenh[scen].size(); j++)
if (matched) params(ncount,parambyscenh[scen][j] - 1) = lparam[j];
for(auto j = 0; j < nmutparams; j++)
if (matched) params(ncount,j) = lparam[nparam[scen] - nmutparams + j - 1];
for(auto j = nparam[scen] - nmutparams; j < nparam[scen]; j++)
params(i,j) = lparam[j];
for(auto j = 0; j < nstat; j++) {
float r;
reftableStream.read(reinterpret_cast<char *>(&r),4);
Expand Down

0 comments on commit 8ecc37e

Please sign in to comment.