diff options
author | Guido Cella <guido@guidocella.xyz> | 2021-06-20 17:10:39 +0200 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2021-06-21 15:36:30 +0000 |
commit | f70995cc9b435f0d26ee3e6a54e4875f6fde8e20 (patch) | |
tree | c4dbf3db987d552b61f3d996bb4633767294560b /player/video.c | |
parent | 48f3a267460f8ca2355a8168e0694e7251b2f5d3 (diff) | |
download | mpv-f70995cc9b435f0d26ee3e6a54e4875f6fde8e20.tar.bz2 mpv-f70995cc9b435f0d26ee3e6a54e4875f6fde8e20.tar.xz |
player: fix segfault
Commit 029ff10 added a goto statement which skipped initializing the
`lang' variable. This could crash depending on compiler optimizations
and other factors: if the lang bstr pointer happened to end up NULL
(which is apparently the case with most compilers) then it's validly
empty, but if it pointed to a random and incorrect memory address then
it crashed.
The crash was observed when mpv was compiled using gcc 10.2 with
optimizations enabled, and affected some third party Windows builds.
This commit ensures the goto doesn't skip the initialization.
Thanks to votemp for figuring this out.
Fixes #8922.
Diffstat (limited to 'player/video.c')
0 files changed, 0 insertions, 0 deletions