Fixes a buffer overrun where the allocated buffer wasn't large enough to accommodate...