with std::vector<char> buf(80), 80 elements are put in the vector, which is not the expected behavior.