[FFmpeg-devel] [PATCH 1/3] exr: limit expected_len to tmp buffer size

Andreas Cadhalpun andreas.cadhalpun at googlemail.com
Wed Nov 16 23:33:16 EET 2016


On 16.11.2016 22:16, Martin Vignali wrote:
> I think the trouble come from another place
> The current channel offset is not correct for uint32 (because it use 1<<0 = 1 instead of 4 for uint32)
> 
> Some months ago i propose a patch who was not accepted for uint32 support in exr.
> But the current channel offset is correctly calculate in this patch.
> 
> Conversation can be found here :
> http://ffmpeg.org/pipermail/ffmpeg-devel/2016-April/192527.html
> 
> The interested part is that :
> -                s->current_channel_offset += 1 << current_pixel_type;
> +                if (current_pixel_type == EXR_HALF) {
> +                    s->current_channel_offset += 2;
> +                } else {/* Float or UINT32 */
> +                    s->current_channel_offset += 4;
> +                }
> 
> 
> I think it's better to fix the uncompress size calculation.

Yes, that is a better fix. Can you send a proper patch for this?

Best regards,
Andreas



More information about the ffmpeg-devel mailing list