gxfenc: assert that the to be written data has not been truncated.