Previous to this pull-request, printing out a memory report immediately prior to this `memcpy` call, and immediately after, showed memory corruption after the call.  I believe it was due to buffer being static and/or not being cleaned up after scope had been left. 

Printing out memory reports around this call after this pull request change does not corrupt memory anymore.