According to the blue book 727.0-B-5 section 4.1.3.2, the CRC is supposed to be included in the data length field. It looks like the CFDP engine is not taking into account the CRC length (if calculated).
4.1.3.2 The CRC value shall be placed in the final octets of the PDU data field, and its
length shall be included in the PDU data field length. The CRC algorithm shall be applied
from the first octet of the PDU header to the last octet of the PDU data field prior to the CRC
value.
According to the blue book 727.0-B-5 section 4.1.3.2, the CRC is supposed to be included in the data length field. It looks like the CFDP engine is not taking into account the CRC length (if calculated).
Example:
https://github.com/OpenC3/openc3-cosmos-cfdp/blob/0994d0eea9161b0af0619e8e45df67904a66b497/microservices/CFDP/lib/cfdp_pdu/cfdp_pdu_file_data.rb#L45-L56