Skip to content

Commit

Permalink
fix: ALI block 'cinf' has diffent size for PSB
Browse files Browse the repository at this point in the history
AdditionalLayerInfo ("ALI") blocks with the 'cinf' key use different
byte length for the size field; PSD files use 4 bytes and PSB files use
8.

This is undocumented in Adobe's docs.

Note that this bug previously did not cause parsing to fail, because our
library ignores unrecognized ALI blocks. However, it _may_ have
prevented recognizing valid ALI blocks that come after a 'cinf' block.
  • Loading branch information
pastelmind committed Jul 11, 2022
1 parent 835eee8 commit 70ffd71
Showing 1 changed file with 1 addition and 0 deletions.
Expand Up @@ -96,6 +96,7 @@ function getAliLengthFieldSizeType(
case "FEid":
case "FXid":
case "PxSD":
case "cinf": // Undocumented in Adobe's docs
return "u64";
}
}
Expand Down

0 comments on commit 70ffd71

Please sign in to comment.