Skip to content

Reject DG2 images unless FAC header matches - #279

Open
bahadirtmzr wants to merge 1 commit into
AndyQ:mainfrom
bahadirtmzr:fix/dg2-fac-header
Open

Reject DG2 images unless FAC header matches#279
bahadirtmzr wants to merge 1 commit into
AndyQ:mainfrom
bahadirtmzr:fix/dg2-fac-header

Conversation

@bahadirtmzr

Copy link
Copy Markdown

DG2 ISO 19794-5 header validation used &&, so it only threw when every one of F, A, C, 0x00 was wrong. A single-byte mismatch was accepted.

The check now requires all four bytes, plus a minimum length of 4. testDatagroup2RejectsInvalidFACHeader covers a FAC\x01 header.

The ISO 19794-5 'FAC\0' check used &&, so it only failed when every
header byte was wrong. Require all four bytes and a minimum length.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant