Using malloc instead of realloc.

md5sum a.out
60eb0b0e1d1032522be4a01f621cd4d9  a.out

Incase reallocating causes the data to be removed, guard against it with
malloc and strcpy.