Message ID | CAFPj7D25ct5PyyiRc4j0fjPs7z0p_LEwrmxeA8SvtpAP=25dEw@mail.gmail.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel] cherrypick ab7926341 into 4.2 | expand |
Context | Check | Description |
---|---|---|
andriy/configure_x86 | warning | Failed to apply patch |
yinshiyou/configure_loongarch64 | warning | Failed to apply patch |
On Thu, Nov 16, 2023 at 02:35:58PM -0800, Reed Weichler wrote: > pretty self-explanatory. > i guess they forgot to cherrypick it when it was first committed. > here is my code to repro: https://pastebin.com/raw/yQr3WWvX > it needs a FLAC file as input. > it hit an EXC_BAD_ACCESS here: > https://github.com/FFmpeg/FFmpeg/blob/c6c36aa97a/libavformat/utils.c#L2227 > index was equal to -1, so that code shouldnt even run, usually means UB. > --- > libavformat/utils.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavformat/utils.c b/libavformat/utils.c > index 4067d55fa1..2143d9fb59 100644 > --- a/libavformat/utils.c > +++ b/libavformat/utils.c > @@ -2183,7 +2183,7 @@ int ff_seek_frame_binary(AVFormatContext *s, int > stream_index, patch corrupted by newline patch locally backported to 4.2 - 4.4 thx [...]
On Thu, 16 Nov 2023, Michael Niedermayer wrote: > On Thu, Nov 16, 2023 at 02:35:58PM -0800, Reed Weichler wrote: >> pretty self-explanatory. >> i guess they forgot to cherrypick it when it was first committed. >> here is my code to repro: https://pastebin.com/raw/yQr3WWvX >> it needs a FLAC file as input. >> it hit an EXC_BAD_ACCESS here: >> https://github.com/FFmpeg/FFmpeg/blob/c6c36aa97a/libavformat/utils.c#L2227 >> index was equal to -1, so that code shouldnt even run, usually means UB. >> --- >> libavformat/utils.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/libavformat/utils.c b/libavformat/utils.c >> index 4067d55fa1..2143d9fb59 100644 >> --- a/libavformat/utils.c >> +++ b/libavformat/utils.c >> @@ -2183,7 +2183,7 @@ int ff_seek_frame_binary(AVFormatContext *s, int >> stream_index, > > patch corrupted by newline > > patch locally backported to 4.2 - 4.4 Instead of applying this patch, I'd suggest just doing a regular cherrypick of the referenced commit - ab7926341 - which would preserve both authorship and the original commit message with the more accurate description of the issue. // Martin
On Fri, Nov 17, 2023 at 07:11:13AM +0200, Martin Storsjö wrote: > On Thu, 16 Nov 2023, Michael Niedermayer wrote: > > > On Thu, Nov 16, 2023 at 02:35:58PM -0800, Reed Weichler wrote: > > > pretty self-explanatory. > > > i guess they forgot to cherrypick it when it was first committed. > > > here is my code to repro: https://pastebin.com/raw/yQr3WWvX > > > it needs a FLAC file as input. > > > it hit an EXC_BAD_ACCESS here: > > > https://github.com/FFmpeg/FFmpeg/blob/c6c36aa97a/libavformat/utils.c#L2227 > > > index was equal to -1, so that code shouldnt even run, usually means UB. > > > --- > > > libavformat/utils.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/libavformat/utils.c b/libavformat/utils.c > > > index 4067d55fa1..2143d9fb59 100644 > > > --- a/libavformat/utils.c > > > +++ b/libavformat/utils.c > > > @@ -2183,7 +2183,7 @@ int ff_seek_frame_binary(AVFormatContext *s, int > > > stream_index, > > > > patch corrupted by newline > > > > patch locally backported to 4.2 - 4.4 > > Instead of applying this patch, I'd suggest just doing a regular cherrypick > of the referenced commit - ab7926341 - which would preserve both authorship > and the original commit message with the more accurate description of the > issue. thats exactly what i did and also to a few older branches thx [...]
diff --git a/libavformat/utils.c b/libavformat/utils.c index 4067d55fa1..2143d9fb59 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2183,7 +2183,7 @@ int ff_seek_frame_binary(AVFormatContext *s, int stream_index, 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;