Zero-error attacks and detection statistics in the coherent one-way protocol for quantum cryptography