Fixes an issue introduced in 72fa2d98e1 where zeromem might write past the end of the channel buffer.
72fa2d98e1