[FFmpeg-devel] [PATCH] libavfilter: guard against ff_draw_init/ff_draw_init2 failures

Michael Niedermayer michael at niedermayer.cc
Tue Mar 4 03:09:37 EET 2025


On Mon, Mar 03, 2025 at 05:05:58PM -0800, Nil Fons Miret via ffmpeg-devel wrote:
> From what I can see, that one time it is called with constants in
> qrencode.c will never fail. I can remove that check, but I am a bit
> worried it will make it brittle if the internals of ff_draw_init*
> change later on, e.g. to introduce more failure modes. In fact, I ran
> across this issue while upgrading an old ffmpeg that did not have some
> of these checks, so it was one of the new checks that caused the
> segfault. Let me know what you think, I am open to changing it.

I think the important bit, is it should be documented.
Its not so important if theres a check. Even with a check it
could be documented that the case cannot occur currently

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250304/d29a746f/attachment.sig>


More information about the ffmpeg-devel mailing list