Use stack instead of broken usage of QByteBuffer