* [FFmpeg-devel] [PATCH 1/3] avformat/imf_cpl: Replace NULL content_title_utf8 by ""
@ 2023-07-25 0:46 Michael Niedermayer
2023-07-25 0:46 ` [FFmpeg-devel] [PATCH 2/3] avcodec/cbs_h266_syntax_template: Check num_subpic_cols for 0 Michael Niedermayer
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Michael Niedermayer @ 2023-07-25 0:46 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Suggested-by: Pierre-Anthony Lemieux <pal@sandflow.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
libavformat/imf_cpl.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavformat/imf_cpl.c b/libavformat/imf_cpl.c
index 69155d786d..5f1a67443f 100644
--- a/libavformat/imf_cpl.c
+++ b/libavformat/imf_cpl.c
@@ -182,6 +182,10 @@ static int fill_content_title(xmlNodePtr cpl_element, FFIMFCPL *cpl)
cpl->content_title_utf8 = xmlNodeListGetString(cpl_element->doc,
element->xmlChildrenNode,
1);
+ if (!cpl->content_title_utf8)
+ cpl->content_title_utf8 = xmlStrdup("");
+ if (!cpl->content_title_utf8)
+ return AVERROR(ENOMEM);
return 0;
}
--
2.17.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] 10+ messages in thread
* [FFmpeg-devel] [PATCH 2/3] avcodec/cbs_h266_syntax_template: Check num_subpic_cols for 0
2023-07-25 0:46 [FFmpeg-devel] [PATCH 1/3] avformat/imf_cpl: Replace NULL content_title_utf8 by "" Michael Niedermayer
@ 2023-07-25 0:46 ` Michael Niedermayer
2023-07-25 1:54 ` James Almer
2023-07-25 0:46 ` [FFmpeg-devel] [PATCH 3/3] avcodec/cbs_h2645: Avoid an unchecked bytesteram read Michael Niedermayer
2023-07-25 4:35 ` [FFmpeg-devel] [PATCH 1/3] avformat/imf_cpl: Replace NULL content_title_utf8 by "" Pierre-Anthony Lemieux
2 siblings, 1 reply; 10+ messages in thread
From: Michael Niedermayer @ 2023-07-25 0:46 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Fixes: division by zero
Fixes: 60306/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5538913553612800
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
libavcodec/cbs_h266_syntax_template.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/cbs_h266_syntax_template.c b/libavcodec/cbs_h266_syntax_template.c
index dce0216fbc..18ecf17e3b 100644
--- a/libavcodec/cbs_h266_syntax_template.c
+++ b/libavcodec/cbs_h266_syntax_template.c
@@ -1187,6 +1187,8 @@ static int FUNC(sps)(CodedBitstreamContext *ctx, RWContext *rw,
} else {
int num_subpic_cols = tmp_width_val /
(current->sps_subpic_width_minus1[0] + 1);
+ if (!num_subpic_cols)
+ return AVERROR_INVALIDDATA;
infer(sps_subpic_ctu_top_left_x[i],
(i % num_subpic_cols) *
(current->sps_subpic_width_minus1[0] + 1));
--
2.17.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] 10+ messages in thread
* [FFmpeg-devel] [PATCH 3/3] avcodec/cbs_h2645: Avoid an unchecked bytesteram read
2023-07-25 0:46 [FFmpeg-devel] [PATCH 1/3] avformat/imf_cpl: Replace NULL content_title_utf8 by "" Michael Niedermayer
2023-07-25 0:46 ` [FFmpeg-devel] [PATCH 2/3] avcodec/cbs_h266_syntax_template: Check num_subpic_cols for 0 Michael Niedermayer
@ 2023-07-25 0:46 ` Michael Niedermayer
2023-07-25 2:28 ` James Almer
2023-07-25 4:35 ` [FFmpeg-devel] [PATCH 1/3] avformat/imf_cpl: Replace NULL content_title_utf8 by "" Pierre-Anthony Lemieux
2 siblings, 1 reply; 10+ messages in thread
From: Michael Niedermayer @ 2023-07-25 0:46 UTC (permalink / raw)
To: FFmpeg development discussions and patches
The unchecked read caused the 2nd subsequent tell call to move backward resulting
in a negative length
Fixes: assertion failure
Fixes: 60276/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5434126636023808
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
libavcodec/cbs_h2645.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c
index 34c5d1d372..21c8bc76d5 100644
--- a/libavcodec/cbs_h2645.c
+++ b/libavcodec/cbs_h2645.c
@@ -695,7 +695,7 @@ static int cbs_h2645_split_fragment(CodedBitstreamContext *ctx,
int nal_unit_type = bytestream2_get_byte(&gbc) & 0x1f;
unsigned int num_nalus = 1;
if(nal_unit_type != VVC_DCI_NUT && nal_unit_type != VVC_OPI_NUT)
- num_nalus = bytestream2_get_be16u(&gbc);
+ num_nalus = bytestream2_get_be16(&gbc);
start = bytestream2_tell(&gbc);
for(i = 0; i < num_nalus; i++) {
--
2.17.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] 10+ messages in thread
* Re: [FFmpeg-devel] [PATCH 2/3] avcodec/cbs_h266_syntax_template: Check num_subpic_cols for 0
2023-07-25 0:46 ` [FFmpeg-devel] [PATCH 2/3] avcodec/cbs_h266_syntax_template: Check num_subpic_cols for 0 Michael Niedermayer
@ 2023-07-25 1:54 ` James Almer
2023-07-25 21:03 ` Michael Niedermayer
0 siblings, 1 reply; 10+ messages in thread
From: James Almer @ 2023-07-25 1:54 UTC (permalink / raw)
To: ffmpeg-devel
On 7/24/2023 9:46 PM, Michael Niedermayer wrote:
> Fixes: division by zero
> Fixes: 60306/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5538913553612800
>
> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
> libavcodec/cbs_h266_syntax_template.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/libavcodec/cbs_h266_syntax_template.c b/libavcodec/cbs_h266_syntax_template.c
> index dce0216fbc..18ecf17e3b 100644
> --- a/libavcodec/cbs_h266_syntax_template.c
> +++ b/libavcodec/cbs_h266_syntax_template.c
> @@ -1187,6 +1187,8 @@ static int FUNC(sps)(CodedBitstreamContext *ctx, RWContext *rw,
> } else {
> int num_subpic_cols = tmp_width_val /
> (current->sps_subpic_width_minus1[0] + 1);
> + if (!num_subpic_cols)
> + return AVERROR_INVALIDDATA;
> infer(sps_subpic_ctu_top_left_x[i],
> (i % num_subpic_cols) *
> (current->sps_subpic_width_minus1[0] + 1));
Does the following fix it too?
> diff --git a/libavcodec/cbs_h266_syntax_template.c b/libavcodec/cbs_h266_syntax_template.c
> index dce0216fbc..98a8e033bf 100644
> --- a/libavcodec/cbs_h266_syntax_template.c
> +++ b/libavcodec/cbs_h266_syntax_template.c
> @@ -1140,6 +1140,8 @@ static int FUNC(sps)(CodedBitstreamContext *ctx, RWContext *rw,
> if (current->sps_num_subpics_minus1 > 0) {
> int wlen = av_ceil_log2(tmp_width_val);
> int hlen = av_ceil_log2(tmp_height_val);
> + infer(sps_subpic_ctu_top_left_x[0], 0);
> + infer(sps_subpic_ctu_top_left_y[0], 0);
> if (current->sps_pic_width_max_in_luma_samples > ctb_size_y)
> ubs(wlen, sps_subpic_width_minus1[0], 1, 0);
> else
> @@ -1147,7 +1149,7 @@ static int FUNC(sps)(CodedBitstreamContext *ctx, RWContext *rw,
> if (current->sps_pic_height_max_in_luma_samples > ctb_size_y)
> ubs(hlen, sps_subpic_height_minus1[0], 1, 0);
> else
> - infer(sps_subpic_height_minus1[0], tmp_height_val);
> + infer(sps_subpic_height_minus1[0], tmp_height_val - 1);
> if (!current->sps_independent_subpics_flag) {
> flags(sps_subpic_treated_as_pic_flag[0], 1, 0);
> flags(sps_loop_filter_across_subpic_enabled_flag[0], 1, 0);
> @@ -1187,6 +1189,12 @@ static int FUNC(sps)(CodedBitstreamContext *ctx, RWContext *rw,
> } else {
> int num_subpic_cols = tmp_width_val /
> (current->sps_subpic_width_minus1[0] + 1);
> + if (tmp_width_val % (current->sps_subpic_width_minus1[0] + 1) ||
> + tmp_height_val % (current->sps_subpic_width_minus1[0] + 1) ||
> + current->sps_num_subpics_minus1 !=
> + (num_subpic_cols * tmp_height_val /
> + (current->sps_subpic_height_minus1[0] + 1) - 1))
> + return AVERROR_INVALIDDATA;
> infer(sps_subpic_ctu_top_left_x[i],
> (i % num_subpic_cols) *
> (current->sps_subpic_width_minus1[0] + 1));
This checks the constrains defined in the spec.
_______________________________________________
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] 10+ messages in thread
* Re: [FFmpeg-devel] [PATCH 3/3] avcodec/cbs_h2645: Avoid an unchecked bytesteram read
2023-07-25 0:46 ` [FFmpeg-devel] [PATCH 3/3] avcodec/cbs_h2645: Avoid an unchecked bytesteram read Michael Niedermayer
@ 2023-07-25 2:28 ` James Almer
2023-07-25 20:41 ` Michael Niedermayer
0 siblings, 1 reply; 10+ messages in thread
From: James Almer @ 2023-07-25 2:28 UTC (permalink / raw)
To: ffmpeg-devel
On 7/24/2023 9:46 PM, Michael Niedermayer wrote:
> The unchecked read caused the 2nd subsequent tell call to move backward resulting
> in a negative length
>
> Fixes: assertion failure
> Fixes: 60276/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5434126636023808
>
> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
> libavcodec/cbs_h2645.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c
> index 34c5d1d372..21c8bc76d5 100644
> --- a/libavcodec/cbs_h2645.c
> +++ b/libavcodec/cbs_h2645.c
> @@ -695,7 +695,7 @@ static int cbs_h2645_split_fragment(CodedBitstreamContext *ctx,
> int nal_unit_type = bytestream2_get_byte(&gbc) & 0x1f;
> unsigned int num_nalus = 1;
> if(nal_unit_type != VVC_DCI_NUT && nal_unit_type != VVC_OPI_NUT)
> - num_nalus = bytestream2_get_be16u(&gbc);
> + num_nalus = bytestream2_get_be16(&gbc);
>
> start = bytestream2_tell(&gbc);
> for(i = 0; i < num_nalus; i++) {
LGTM.
_______________________________________________
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] 10+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/3] avformat/imf_cpl: Replace NULL content_title_utf8 by ""
2023-07-25 0:46 [FFmpeg-devel] [PATCH 1/3] avformat/imf_cpl: Replace NULL content_title_utf8 by "" Michael Niedermayer
2023-07-25 0:46 ` [FFmpeg-devel] [PATCH 2/3] avcodec/cbs_h266_syntax_template: Check num_subpic_cols for 0 Michael Niedermayer
2023-07-25 0:46 ` [FFmpeg-devel] [PATCH 3/3] avcodec/cbs_h2645: Avoid an unchecked bytesteram read Michael Niedermayer
@ 2023-07-25 4:35 ` Pierre-Anthony Lemieux
2023-07-25 20:37 ` Michael Niedermayer
2 siblings, 1 reply; 10+ messages in thread
From: Pierre-Anthony Lemieux @ 2023-07-25 4:35 UTC (permalink / raw)
To: FFmpeg development discussions and patches
LGTM.
On Mon, Jul 24, 2023 at 5:46 PM Michael Niedermayer
<michael@niedermayer.cc> wrote:
>
> Suggested-by: Pierre-Anthony Lemieux <pal@sandflow.com>
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
> libavformat/imf_cpl.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/libavformat/imf_cpl.c b/libavformat/imf_cpl.c
> index 69155d786d..5f1a67443f 100644
> --- a/libavformat/imf_cpl.c
> +++ b/libavformat/imf_cpl.c
> @@ -182,6 +182,10 @@ static int fill_content_title(xmlNodePtr cpl_element, FFIMFCPL *cpl)
> cpl->content_title_utf8 = xmlNodeListGetString(cpl_element->doc,
> element->xmlChildrenNode,
> 1);
> + if (!cpl->content_title_utf8)
> + cpl->content_title_utf8 = xmlStrdup("");
> + if (!cpl->content_title_utf8)
> + return AVERROR(ENOMEM);
>
> return 0;
> }
> --
> 2.17.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".
_______________________________________________
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] 10+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/3] avformat/imf_cpl: Replace NULL content_title_utf8 by ""
2023-07-25 4:35 ` [FFmpeg-devel] [PATCH 1/3] avformat/imf_cpl: Replace NULL content_title_utf8 by "" Pierre-Anthony Lemieux
@ 2023-07-25 20:37 ` Michael Niedermayer
0 siblings, 0 replies; 10+ messages in thread
From: Michael Niedermayer @ 2023-07-25 20:37 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1.1: Type: text/plain, Size: 276 bytes --]
On Mon, Jul 24, 2023 at 09:35:22PM -0700, Pierre-Anthony Lemieux wrote:
> LGTM.
will apply
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus
[-- 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] 10+ messages in thread
* Re: [FFmpeg-devel] [PATCH 3/3] avcodec/cbs_h2645: Avoid an unchecked bytesteram read
2023-07-25 2:28 ` James Almer
@ 2023-07-25 20:41 ` Michael Niedermayer
0 siblings, 0 replies; 10+ messages in thread
From: Michael Niedermayer @ 2023-07-25 20:41 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1.1: Type: text/plain, Size: 1707 bytes --]
On Mon, Jul 24, 2023 at 11:28:20PM -0300, James Almer wrote:
> On 7/24/2023 9:46 PM, Michael Niedermayer wrote:
> > The unchecked read caused the 2nd subsequent tell call to move backward resulting
> > in a negative length
> >
> > Fixes: assertion failure
> > Fixes: 60276/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5434126636023808
> >
> > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> > ---
> > libavcodec/cbs_h2645.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c
> > index 34c5d1d372..21c8bc76d5 100644
> > --- a/libavcodec/cbs_h2645.c
> > +++ b/libavcodec/cbs_h2645.c
> > @@ -695,7 +695,7 @@ static int cbs_h2645_split_fragment(CodedBitstreamContext *ctx,
> > int nal_unit_type = bytestream2_get_byte(&gbc) & 0x1f;
> > unsigned int num_nalus = 1;
> > if(nal_unit_type != VVC_DCI_NUT && nal_unit_type != VVC_OPI_NUT)
> > - num_nalus = bytestream2_get_be16u(&gbc);
> > + num_nalus = bytestream2_get_be16(&gbc);
> > start = bytestream2_tell(&gbc);
> > for(i = 0; i < num_nalus; i++) {
>
> LGTM.
will apply
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
"You are 36 times more likely to die in a bathtub than at the hands of a
terrorist. Also, you are 2.5 times more likely to become a president and
2 times more likely to become an astronaut, than to die in a terrorist
attack." -- Thoughty2
[-- 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] 10+ messages in thread
* Re: [FFmpeg-devel] [PATCH 2/3] avcodec/cbs_h266_syntax_template: Check num_subpic_cols for 0
2023-07-25 1:54 ` James Almer
@ 2023-07-25 21:03 ` Michael Niedermayer
2023-07-25 21:08 ` James Almer
0 siblings, 1 reply; 10+ messages in thread
From: Michael Niedermayer @ 2023-07-25 21:03 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1.1: Type: text/plain, Size: 1785 bytes --]
On Mon, Jul 24, 2023 at 10:54:20PM -0300, James Almer wrote:
> On 7/24/2023 9:46 PM, Michael Niedermayer wrote:
> > Fixes: division by zero
> > Fixes: 60306/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5538913553612800
> >
> > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> > ---
> > libavcodec/cbs_h266_syntax_template.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/libavcodec/cbs_h266_syntax_template.c b/libavcodec/cbs_h266_syntax_template.c
> > index dce0216fbc..18ecf17e3b 100644
> > --- a/libavcodec/cbs_h266_syntax_template.c
> > +++ b/libavcodec/cbs_h266_syntax_template.c
> > @@ -1187,6 +1187,8 @@ static int FUNC(sps)(CodedBitstreamContext *ctx, RWContext *rw,
> > } else {
> > int num_subpic_cols = tmp_width_val /
> > (current->sps_subpic_width_minus1[0] + 1);
> > + if (!num_subpic_cols)
> > + return AVERROR_INVALIDDATA;
> > infer(sps_subpic_ctu_top_left_x[i],
> > (i % num_subpic_cols) *
> > (current->sps_subpic_width_minus1[0] + 1));
>
> Does the following fix it too?
yes, feel free to push this, or i can if you prefer?
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Dictatorship: All citizens are under surveillance, all their steps and
actions recorded, for the politicians to enforce control.
Democracy: All politicians are under surveillance, all their steps and
actions recorded, for the citizens to enforce control.
[-- 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] 10+ messages in thread
* Re: [FFmpeg-devel] [PATCH 2/3] avcodec/cbs_h266_syntax_template: Check num_subpic_cols for 0
2023-07-25 21:03 ` Michael Niedermayer
@ 2023-07-25 21:08 ` James Almer
0 siblings, 0 replies; 10+ messages in thread
From: James Almer @ 2023-07-25 21:08 UTC (permalink / raw)
To: ffmpeg-devel
On 7/25/2023 6:03 PM, Michael Niedermayer wrote:
> On Mon, Jul 24, 2023 at 10:54:20PM -0300, James Almer wrote:
>> On 7/24/2023 9:46 PM, Michael Niedermayer wrote:
>>> Fixes: division by zero
>>> Fixes: 60306/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5538913553612800
>>>
>>> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
>>> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
>>> ---
>>> libavcodec/cbs_h266_syntax_template.c | 2 ++
>>> 1 file changed, 2 insertions(+)
>>>
>>> diff --git a/libavcodec/cbs_h266_syntax_template.c b/libavcodec/cbs_h266_syntax_template.c
>>> index dce0216fbc..18ecf17e3b 100644
>>> --- a/libavcodec/cbs_h266_syntax_template.c
>>> +++ b/libavcodec/cbs_h266_syntax_template.c
>>> @@ -1187,6 +1187,8 @@ static int FUNC(sps)(CodedBitstreamContext *ctx, RWContext *rw,
>>> } else {
>>> int num_subpic_cols = tmp_width_val /
>>> (current->sps_subpic_width_minus1[0] + 1);
>>> + if (!num_subpic_cols)
>>> + return AVERROR_INVALIDDATA;
>>> infer(sps_subpic_ctu_top_left_x[i],
>>> (i % num_subpic_cols) *
>>> (current->sps_subpic_width_minus1[0] + 1));
>>
>> Does the following fix it too?
>
> yes, feel free to push this, or i can if you prefer?
Just pushed it. Thanks.
_______________________________________________
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] 10+ messages in thread
end of thread, other threads:[~2023-07-25 21:08 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-25 0:46 [FFmpeg-devel] [PATCH 1/3] avformat/imf_cpl: Replace NULL content_title_utf8 by "" Michael Niedermayer
2023-07-25 0:46 ` [FFmpeg-devel] [PATCH 2/3] avcodec/cbs_h266_syntax_template: Check num_subpic_cols for 0 Michael Niedermayer
2023-07-25 1:54 ` James Almer
2023-07-25 21:03 ` Michael Niedermayer
2023-07-25 21:08 ` James Almer
2023-07-25 0:46 ` [FFmpeg-devel] [PATCH 3/3] avcodec/cbs_h2645: Avoid an unchecked bytesteram read Michael Niedermayer
2023-07-25 2:28 ` James Almer
2023-07-25 20:41 ` Michael Niedermayer
2023-07-25 4:35 ` [FFmpeg-devel] [PATCH 1/3] avformat/imf_cpl: Replace NULL content_title_utf8 by "" Pierre-Anthony Lemieux
2023-07-25 20:37 ` Michael Niedermayer
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