Some tests cause a zero length input or output, which can mean the allocated test output buffers can be zero length. Protect against calling memcpy blindly in these situations. Signed-off-by: Paul Elliott <paul.elliott@arm.com>