[FFmpeg-devel] libavcodec : add psd image file decoder

Carl Eugen Hoyos ceffmpeg at gmail.com
Tue Nov 22 02:21:08 EET 2016


2016-11-22 0:57 GMT+01:00 Andreas Cadhalpun <andreas.cadhalpun at googlemail.com>:
> On 20.11.2016 17:57, Martin Vignali wrote:

>>>> +    s->height = bytestream2_get_be32(&s->gb);
>>>> +
>>>> +    if ((s->height < 1) || (s->height > 30000)) {
>>>
>>> Why 30000?
>>> ff_set_dimensions already checks for sane dimensions.
>>>
>>
>> Following adobe specs :
>> http://www.adobe.com/devnet-apps/photoshop/fileformatashtml/#50577409_pgfId-1055726
>> in a psd file, the width or height, can't be > to 30 000 pixels.
>
> I see. In that case it makes sense to explicitly check this, as
> the check in ff_set_dimensions is more general and might
> change in the future.

If an application writes psd files with width or height > 30000 (or,
horribile dictu, Adobe changes the limits), we want to decode
such images (unless strict strict was set).

Carl Eugen


More information about the ffmpeg-devel mailing list