I don't think there's an issue with setting block[SIZBUF] to NUL since it doesn't seem to be overflowing. It's just not adding the last 352 bytes to the string.
I'll look at it some more later, but if you want to try it sooner, I posted the whole source code for it...