fix buffer overflow bug
Merge pull request #27 from maralla/stackoverflow

fix buffer overflow bug