Please show us that corruption string that you can build, and the call to the utf8 library that then corrupts the heap. I don't believe you.