fix resizing buffer in anyoption

Closes #208
Merge pull request #246 from mhamrle/ot_crash

fix resizing buffer in anyoption