Fix invalid pointer dereferenced when writing the trace file header.
Fix invalid pointer dereferenced when writing the trace file header.

A pointer to the top of the write buffer, cast to a TraceFileHeader structure, was
being retained and used after the underlying buffer was potentially reallocated.

BUG= http://code.google.com/p/sawbuck/issues/detail?id=49
TEST=

Review URL: https://codereview.appspot.com/6197088

git-svn-id: db59699583a60be9a535cd09cdc9132301867226@819 15e8cca8-e42c-11de-a347-f34a4f72eb7d

Eloston/syzygy,ericmckean/syzygy,wangming28/syzygy,pombreda/syzygy,ericmckean/syzygy,ericmckean/syzygy,supriyantomaftuh/syzygy,Eloston/syzygy,google/syzygy,sebmarchand/syzygy,ericmckean/syzygy,sebmarchand/syzygy,wangming28/syzygy,ericmckean/syzygy,pombreda/syzygy,wangming28/syzygy,sebmarchand/syzygy,google/syzygy,wangming28/syzygy,pombreda/syzygy,supriyantomaftuh/syzygy,supriyantomaftuh/syzygy,google/syzygy,supriyantomaftuh/syzygy,sebmarchand/syzygy,google/syzygy,pombreda/syzygy,sebmarchand/syzygy,pombreda/syzygy