Refactor: Replace malloc buff with std::vector
Reduce scan-build verbosity