summaryrefslogtreecommitdiffstats
path: root/video/out/cocoa_common.h
diff options
context:
space:
mode:
authorAvi Halachmi (:avih) <avihpit@yahoo.com>2021-04-04 14:11:15 +0300
committersfan5 <sfan5@live.de>2021-04-05 18:14:04 +0200
commitcb3fa04bcb2ba9e0d25788480359157208c13e0b (patch)
tree3a1e0e0eef5a0dea5e5e02a13f325a5fb73fa561 /video/out/cocoa_common.h
parent0728b514980cccd13543eea53a8e23332e233a6c (diff)
downloadmpv-cb3fa04bcb2ba9e0d25788480359157208c13e0b.tar.bz2
mpv-cb3fa04bcb2ba9e0d25788480359157208c13e0b.tar.xz
demux_mf: improve format string processing
Before this commit, the user could specify a printf format string which wasn't verified, and could result in: - Undefined behavior due to missing or non-matching arguments. - Buffer overflow due to untested result length. The offending code was added at commit 103a9609 (2002, mplayer svn): git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4566 b3059339-0415-0410-9bf9-f77b7e298cf2 It moved around but was not modified meaningfully until now. Now we reject all conversion specifiers at the format except %% and a simple subset of the valid specifiers. Also, we now use snprintf to avoid buffer overflow. The format string is provided by the user as part of mf:// URI. Report and initial patch by Stefan Schiller. Patch reviewed by @jeeb, @sfan5, Stefan Schiller.
Diffstat (limited to 'video/out/cocoa_common.h')
0 files changed, 0 insertions, 0 deletions