https://github.com/google/security-research/security/advisories/GHSA-vhxg-9wfx-7fcj

so I downloaded 

https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/6f53f0d09ea4c9c7f7354f018a87ef840315207d

and turned it into ffmpeg-5.1.patch6
(attached)

from description it sounds quite bad, so if this patch does not regress normal files we better to apply it or may be update whole ffmpeg to 5.1.2 ?