Method and apparatus for error detection in a data block