Review Feedback: Remove use of static buffer.

Use a dynamically allocated buffer instead to avoid any
multi-threading dangers.