DReichLab / AdmixTools

Tools test whether admixture occurred and more
183 stars 64 forks source link

fix buffer overrun of initvmix's ww2 vector #18

Closed jrandall closed 7 years ago

jrandall commented 7 years ago

Ensures that the ww2 vector is allocated to be at least as large as the ww vector with which it is multiplied by ensuring that nvar is at least as large as nwts.

Not sure if this is "correct" in terms of the algorithm but it does fix the crash which results from the buffer overrun caused by nvar being smaller than nwts, and qpGraph runs to completion after applying this fix.

Fixes #17

jrandall commented 7 years ago

Alternative fix appied.