malloc the char buffer because size is not constant
unique_ptr
Merge pull request #364 from chambbj/issues/356-malloc-char-buf

malloc the char buffer because size is not constant