diff options
Diffstat (limited to 'graphics/ffmpeg/patches/patch-libavformat_utils_c')
| -rw-r--r-- | graphics/ffmpeg/patches/patch-libavformat_utils_c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/graphics/ffmpeg/patches/patch-libavformat_utils_c b/graphics/ffmpeg/patches/patch-libavformat_utils_c new file mode 100644 index 0000000..fa0c918 --- /dev/null +++ b/graphics/ffmpeg/patches/patch-libavformat_utils_c | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | llvm 16 optimizations lead to a segfault when seeking in opus files because | ||
| 2 | checks that could leave pos_max uninitialized are optimized away, leading | ||
| 3 | to out-of-bounds reads from the guard pages. | ||
| 4 | |||
| 5 | av_uninit() is complete batshittery: | ||
| 6 | |||
| 7 | https://marc.info/?l=openbsd-ports&m=170284868209618&w=2 | ||
| 8 | |||
| 9 | Turns out the same commit has landed upstream: | ||
| 10 | |||
| 11 | https://github.com/FFmpeg/FFmpeg/commit/ab792634197e364ca1bb194f9abe36836e42f12d | ||
| 12 | |||
| 13 | Index: libavformat/utils.c | ||
| 14 | --- libavformat/utils.c.orig | ||
| 15 | +++ libavformat/utils.c | ||
| 16 | @@ -2146,7 +2146,7 @@ int ff_seek_frame_binary(AVFormatContext *s, int strea | ||
| 17 | int64_t target_ts, int flags) | ||
| 18 | { | ||
| 19 | const AVInputFormat *avif = s->iformat; | ||
| 20 | - int64_t av_uninit(pos_min), av_uninit(pos_max), pos, pos_limit; | ||
| 21 | + int64_t pos_min = 0, pos_max = 0, pos, pos_limit; | ||
| 22 | int64_t ts_min, ts_max, ts; | ||
| 23 | int index; | ||
| 24 | int64_t ret; | ||
