[FFmpeg-devel] [PATCH] libavformat/usmdec: add support for HCA stream decryption
Pavel Roslyy
roslypav at gmail.com
Thu Jun 26 10:04:17 EEST 2025
Hi Michael,
On Wed, Jun 25, 2025 at 3:13 PM Michael Niedermayer
<michael at niedermayer.cc> wrote:
>
> Hi
>
> [...]
>
> please submit a patch adding documentation for both hca / usmdec to doc/
> and also add a fate test
It might take me a few days since I don't know what I'm doing, but I will try.
Regarding the usm sample, I will try to see if I have something smaller.
On Wed, Jun 25, 2025 at 3:40 PM Michael Niedermayer
<michael at niedermayer.cc> wrote:
>
> [...]
>
> bug found, not applying yet
>
> ret = ff_alloc_extradata(par, pkt_size + key_buf);
>
> pkt_size + key_buf can overflow i think
If I'm understanding right, I don't think it can.
pkt_size = chunk_size - (ret - chunk_start) - padding_size;
(ret - chunk_start) should be at least 24 at this point, and I don't think
padding_size will be negative so pkt_size is at most UINT32_MAX - 24.
key_buf adds at most 10, which is not enough to overflow.
> also LIBAVFORMAT_VERSION_MICRO could be increased
Understood, will do that in a separate patch or bundled into a v2 of this
patch, whichever needs to happen.
Regards,
Pavel Roslyy
More information about the ffmpeg-devel
mailing list