summaryrefslogtreecommitdiffstats
path: root/osdep/atomics.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-11-27 21:54:37 +0100
committerwm4 <wm4@nowhere>2014-11-27 21:54:37 +0100
commit4ea094ac7eac568d5375cbe5e03c10870e8d1494 (patch)
treec19d7618de1aea2cf0cacb6d49d67bfb5eb500a8 /osdep/atomics.h
parent4a83f3df117c6f345210d01af7662097a9eab07f (diff)
downloadmpv-4ea094ac7eac568d5375cbe5e03c10870e8d1494.tar.bz2
mpv-4ea094ac7eac568d5375cbe5e03c10870e8d1494.tar.xz
demux_mkv: fix a possible out of bounds access
The if branch has a weak check to test whether the codec_id is the short ID, and handles the long IDs in the else branch. The long IDs are all longer than 12 bytes long, so hardcoding the string offset to get the trailing part of the name makes sense. But the if condition checks for another thing, which could get the else branch run even if the codec_id is short. Fix the bogus control flow and check if the codec_id is long enough. One of these checks could be considered redundant, but include them both for defensive coding.
Diffstat (limited to 'osdep/atomics.h')
0 files changed, 0 insertions, 0 deletions