a heap has been corrupted

I didn’t find a complete solution, but I changed the setData’s first argument from std::string to const char* and added a second argument for its size…