24 lines
874 B
Text
24 lines
874 B
Text
llvm 16 optimizations lead to a segfault when seeking in opus files because
|
|
checks that could leave pos_max uninitialized are optimized away, leading
|
|
to out-of-bounds reads from the guard pages.
|
|
|
|
av_uninit() is complete batshittery:
|
|
|
|
https://marc.info/?l=openbsd-ports&m=170284868209618&w=2
|
|
|
|
Turns out the same commit has landed upstream:
|
|
|
|
https://github.com/FFmpeg/FFmpeg/commit/ab792634197e364ca1bb194f9abe36836e42f12d
|
|
|
|
Index: libavformat/utils.c
|
|
--- libavformat/utils.c.orig
|
|
+++ libavformat/utils.c
|
|
@@ -2146,7 +2146,7 @@ int ff_seek_frame_binary(AVFormatContext *s, int strea
|
|
int64_t target_ts, int flags)
|
|
{
|
|
const AVInputFormat *avif = s->iformat;
|
|
- int64_t av_uninit(pos_min), av_uninit(pos_max), pos, pos_limit;
|
|
+ int64_t pos_min = 0, pos_max = 0, pos, pos_limit;
|
|
int64_t ts_min, ts_max, ts;
|
|
int index;
|
|
int64_t ret;
|