decode: Do not overflow the chunk buffer