Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] cherrypick ab7926341 into 4.2
@ 2023-11-16 22:35 Reed Weichler
  2023-11-16 22:50 ` Michael Niedermayer
  0 siblings, 1 reply; 6+ messages in thread
From: Reed Weichler @ 2023-11-16 22:35 UTC (permalink / raw)
  To: ffmpeg-devel

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,
                          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;
--
2.42.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [FFmpeg-devel] [PATCH] cherrypick ab7926341 into 4.2
  2023-11-16 22:35 [FFmpeg-devel] [PATCH] cherrypick ab7926341 into 4.2 Reed Weichler
@ 2023-11-16 22:50 ` Michael Niedermayer
  2023-11-17  5:11   ` Martin Storsjö
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Niedermayer @ 2023-11-16 22:50 UTC (permalink / raw)
  To: FFmpeg development discussions and patches


[-- Attachment #1.1: Type: text/plain, Size: 1062 bytes --]

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

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

"I am not trying to be anyone's saviour, I'm trying to think about the
 future and not be sad" - Elon Musk


[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 251 bytes --]

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [FFmpeg-devel] [PATCH] cherrypick ab7926341 into 4.2
  2023-11-16 22:50 ` Michael Niedermayer
@ 2023-11-17  5:11   ` Martin Storsjö
  2023-11-17 17:18     ` Michael Niedermayer
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Storsjö @ 2023-11-17  5:11 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

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

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [FFmpeg-devel] [PATCH] cherrypick ab7926341 into 4.2
  2023-11-17  5:11   ` Martin Storsjö
@ 2023-11-17 17:18     ` Michael Niedermayer
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Niedermayer @ 2023-11-17 17:18 UTC (permalink / raw)
  To: FFmpeg development discussions and patches


[-- Attachment #1.1: Type: text/plain, Size: 1563 bytes --]

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

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 251 bytes --]

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [FFmpeg-devel] [PATCH] cherrypick ab7926341 into 4.2
  2023-11-16 22:28 Reed Weichler
@ 2023-11-16 22:34 ` Reed Weichler
  0 siblings, 0 replies; 6+ messages in thread
From: Reed Weichler @ 2023-11-16 22:34 UTC (permalink / raw)
  To: ffmpeg-devel

Oops, sorry. I forgot to turn off HTML. Let me retry

On Thu, Nov 16, 2023 at 2:28 PM Reed Weichler <rweichler@gmail.com> 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, which usually means
> undefined behavior
> ---
>  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,
>                           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;
> --
> 2.42.1
>
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [FFmpeg-devel] [PATCH] cherrypick ab7926341 into 4.2
@ 2023-11-16 22:28 Reed Weichler
  2023-11-16 22:34 ` Reed Weichler
  0 siblings, 1 reply; 6+ messages in thread
From: Reed Weichler @ 2023-11-16 22:28 UTC (permalink / raw)
  To: ffmpeg-devel

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, which usually means
undefined behavior
---
 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,
                          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;
--
2.42.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-11-17 17:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-16 22:35 [FFmpeg-devel] [PATCH] cherrypick ab7926341 into 4.2 Reed Weichler
2023-11-16 22:50 ` Michael Niedermayer
2023-11-17  5:11   ` Martin Storsjö
2023-11-17 17:18     ` Michael Niedermayer
  -- strict thread matches above, loose matches on Subject: below --
2023-11-16 22:28 Reed Weichler
2023-11-16 22:34 ` Reed Weichler

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git