Correct oggpack_writecopy bug reported by Ian Nartowicz: Integer overflow checking in oggpack_writecopy_helper got the reallocation size test condition backwards and so would error out when it needed to expand the destination's internal buffer.
Correct oggpack_writecopy bug reported by Ian Nartowicz: Integer
overflow checking in oggpack_writecopy_helper got the reallocation
size test condition backwards and so would error out when it needed to
expand the destination's internal buffer.

At the same time, do preexpansion of both aligned and unaligned copies
to avoid possible heap thrashing in the unaligned case.

Add black and glass box unit tests for oggpack_writecopy and
oggpackB_writecopy.



git-svn-id: a21e2c1a9f1a66aa2b49a2fb7314df0f83771e9b@19119 0101bb08-14d6-0310-b084-bc0e0c8e3800

svn2github/ogg,svn2github/libogg,svn2github/ogg,svn2github/libogg