Fix formatting bug with long strings

There was an issue where long strings could not be formatted back into themselves when calling the secure functions to zero memory. This will still zero the original memory block of the reallocated block is at a new address.