Skip to content
Open
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
7 changes: 7 additions & 0 deletions src/lib/OpenEXRCore/chunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1640,6 +1640,13 @@ exr_read_deep_chunk (

if (rv != EXR_ERR_SUCCESS) return rv;

/* the on-disk sample count table is little-endian; convert to native so
* callers receive host-order counts (matching unpacked pixel data) */
if (sample_data && cinfo->sample_count_table_size > 0)
priv_to_native32 (
sample_data,
(int) (cinfo->sample_count_table_size / sizeof (uint32_t)));

if (packed_data && cinfo->packed_size > 0)
{
dataoffset = cinfo->data_offset;
Expand Down
Loading