Zero out buffer correctly

sizeof() cannot be used on an array allocated using malloc(). When you
allocate the array, it is your responsibility to remember how much
memory you allocated in the first place.
Augean cleanup #1. This looks ghastly
Ignore binary