Fixed a bug in testapp main.cpp where the read buffer was not allocated dynamically