Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept null bytes in DPX version #438

Merged
merged 1 commit into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Project/GNU/CLI/test/test1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ Formats/DPX/Flavors/Y_16_FilledA_BE/0000001.dpx pass
Formats/DPX/Flavors/Y_16_Packed_BE/FFmpeg_gray16be.dpx pass
Formats/DPX/Flavors/Y_16_Packed_LE/FFmpeg_gray16le.dpx pass
Formats/DPX/Conformance/0004_OffsetToImageData/0004_OffsetToImageData_000000.dpx fail
Formats/DPX/Conformance/0008_VersionNumber/0008_VersionNumber_null.dpx pass
Formats/DPX/Conformance/0008_VersionNumber/0008_VersionNumber_v.dpx pass
Formats/EXR/Features/Compressed/PXR24/AllHalfValues.exr fail
Formats/EXR/Flavors/RGB_16F/Color_Test_Chart_LogC_400ASA_3200k.cpu.00.exr pass
Expand Down
9 changes: 6 additions & 3 deletions Source/Lib/Uncompressed/DPX/DPX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ void dpx::ParseBuffer()
uint64_t VersionNumberBig = Get_B4();
switch (VersionNumberBig)
{
case 0x00000000LL: // Not conform to spec but it exists and it does not hurt
case 0x56312E30LL:
case 0x56322E30LL:
case 0x76312E30LL:
Expand Down Expand Up @@ -638,10 +639,12 @@ void dpx::ConformanceCheck()
uint32_t OffsetToImageData = Get_X4();
if (OffsetToImageData < 1664 || OffsetToImageData > Buffer.Size())
Invalid(invalid::OffsetToImageData);
uint64_t VersionNumber = Get_B8() >> 24;
switch (VersionNumber)
uint64_t VersionNumberBig = Get_B4();
switch (VersionNumberBig)
{
case 0x76312E3000LL:
case 0x00000000LL:
case 0x76312E30LL:
case 0x76322E30LL:
Invalid(invalid::VersionNumber);
default:;
}
Expand Down
Loading