diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2023-01-16 13:14:01 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-01-26 23:37:05 +0000 |
commit | d95be1c7edc3ce0b7a27c9d8dfbaa178162a89e9 (patch) | |
tree | ce9ef55cfe149cfb51a64af2e73ea1064026bc37 | |
parent | 0118853b5bc6402cc8e43be54cd62520f6c19c62 (diff) | |
download | poky-d95be1c7edc3ce0b7a27c9d8dfbaa178162a89e9.tar.gz |
ffmpeg: refresh patches to apply cleanly
* the last patch added in:
https://git.openembedded.org/openembedded-core/commit/?h=kirkstone&id=874b72fe259cd3a23f4613fccfe2e9cc3f79cd6a
doesn't apply cleanly.
* fixes:
ERROR: ffmpeg-5.0.1-r0 do_patch: Fuzz detected:
Applying patch 0001-avcodec-vp3-Add-missing-check-for-av_malloc.patch
patching file libavcodec/vp3.c
Hunk #1 succeeded at 2677 with fuzz 1 (offset -2 lines).
(From OE-Core rev: 6060dec1fc9d215f6b2ff9d6571bac802ac6a09b)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 files changed, 15 insertions, 23 deletions
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-avcodec-rpzaenc-stop-accessing-out-of-bounds-frame.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-avcodec-rpzaenc-stop-accessing-out-of-bounds-frame.patch index 2775a81cc8..23573bb6b3 100644 --- a/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-avcodec-rpzaenc-stop-accessing-out-of-bounds-frame.patch +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-avcodec-rpzaenc-stop-accessing-out-of-bounds-frame.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 92f9b28ed84a77138105475beba16c146bdaf984 Mon Sep 17 00:00:00 2001 | 1 | From ce25c03fb83395c0a8b5b8121182a486c4408dd4 Mon Sep 17 00:00:00 2001 |
2 | From: Paul B Mahol <onemda@gmail.com> | 2 | From: Paul B Mahol <onemda@gmail.com> |
3 | Date: Sat, 12 Nov 2022 16:12:00 +0100 | 3 | Date: Sat, 12 Nov 2022 16:12:00 +0100 |
4 | Subject: [PATCH] avcodec/rpzaenc: stop accessing out of bounds frame | 4 | Subject: [PATCH] avcodec/rpzaenc: stop accessing out of bounds frame |
@@ -12,10 +12,10 @@ Signed-off-by: <narpat.mali@windriver.com> | |||
12 | 1 file changed, 15 insertions(+), 7 deletions(-) | 12 | 1 file changed, 15 insertions(+), 7 deletions(-) |
13 | 13 | ||
14 | diff --git a/libavcodec/rpzaenc.c b/libavcodec/rpzaenc.c | 14 | diff --git a/libavcodec/rpzaenc.c b/libavcodec/rpzaenc.c |
15 | index d710eb4f82..4ced9523e2 100644 | 15 | index 337b1fa..3e97c87 100644 |
16 | --- a/libavcodec/rpzaenc.c | 16 | --- a/libavcodec/rpzaenc.c |
17 | +++ b/libavcodec/rpzaenc.c | 17 | +++ b/libavcodec/rpzaenc.c |
18 | @@ -205,7 +205,7 @@ static void get_max_component_diff(const BlockInfo *bi, const uint16_t *block_pt | 18 | @@ -205,7 +205,7 @@ static void get_max_component_diff(BlockInfo *bi, uint16_t *block_ptr, |
19 | 19 | ||
20 | // loop thru and compare pixels | 20 | // loop thru and compare pixels |
21 | for (y = 0; y < bi->block_height; y++) { | 21 | for (y = 0; y < bi->block_height; y++) { |
@@ -24,7 +24,7 @@ index d710eb4f82..4ced9523e2 100644 | |||
24 | // TODO: optimize | 24 | // TODO: optimize |
25 | min_r = FFMIN(R(block_ptr[x]), min_r); | 25 | min_r = FFMIN(R(block_ptr[x]), min_r); |
26 | min_g = FFMIN(G(block_ptr[x]), min_g); | 26 | min_g = FFMIN(G(block_ptr[x]), min_g); |
27 | @@ -278,7 +278,7 @@ static int leastsquares(const uint16_t *block_ptr, const BlockInfo *bi, | 27 | @@ -277,7 +277,7 @@ static int leastsquares(uint16_t *block_ptr, BlockInfo *bi, |
28 | return -1; | 28 | return -1; |
29 | 29 | ||
30 | for (i = 0; i < bi->block_height; i++) { | 30 | for (i = 0; i < bi->block_height; i++) { |
@@ -33,7 +33,7 @@ index d710eb4f82..4ced9523e2 100644 | |||
33 | x = GET_CHAN(block_ptr[j], xchannel); | 33 | x = GET_CHAN(block_ptr[j], xchannel); |
34 | y = GET_CHAN(block_ptr[j], ychannel); | 34 | y = GET_CHAN(block_ptr[j], ychannel); |
35 | sumx += x; | 35 | sumx += x; |
36 | @@ -325,7 +325,7 @@ static int calc_lsq_max_fit_error(const uint16_t *block_ptr, const BlockInfo *bi | 36 | @@ -324,7 +324,7 @@ static int calc_lsq_max_fit_error(uint16_t *block_ptr, BlockInfo *bi, |
37 | int max_err = 0; | 37 | int max_err = 0; |
38 | 38 | ||
39 | for (i = 0; i < bi->block_height; i++) { | 39 | for (i = 0; i < bi->block_height; i++) { |
@@ -42,7 +42,7 @@ index d710eb4f82..4ced9523e2 100644 | |||
42 | int x_inc, lin_y, lin_x; | 42 | int x_inc, lin_y, lin_x; |
43 | x = GET_CHAN(block_ptr[j], xchannel); | 43 | x = GET_CHAN(block_ptr[j], xchannel); |
44 | y = GET_CHAN(block_ptr[j], ychannel); | 44 | y = GET_CHAN(block_ptr[j], ychannel); |
45 | @@ -420,7 +420,9 @@ static void update_block_in_prev_frame(const uint16_t *src_pixels, | 45 | @@ -419,7 +419,9 @@ static void update_block_in_prev_frame(const uint16_t *src_pixels, |
46 | uint16_t *dest_pixels, | 46 | uint16_t *dest_pixels, |
47 | const BlockInfo *bi, int block_counter) | 47 | const BlockInfo *bi, int block_counter) |
48 | { | 48 | { |
@@ -53,7 +53,7 @@ index d710eb4f82..4ced9523e2 100644 | |||
53 | memcpy(dest_pixels, src_pixels, 8); | 53 | memcpy(dest_pixels, src_pixels, 8); |
54 | dest_pixels += bi->rowstride; | 54 | dest_pixels += bi->rowstride; |
55 | src_pixels += bi->rowstride; | 55 | src_pixels += bi->rowstride; |
56 | @@ -730,14 +732,15 @@ post_skip : | 56 | @@ -729,14 +731,15 @@ post_skip : |
57 | 57 | ||
58 | if (err > s->sixteen_color_thresh) { // DO SIXTEEN COLOR BLOCK | 58 | if (err > s->sixteen_color_thresh) { // DO SIXTEEN COLOR BLOCK |
59 | uint16_t *row_ptr; | 59 | uint16_t *row_ptr; |
@@ -72,7 +72,7 @@ index d710eb4f82..4ced9523e2 100644 | |||
72 | rgb555 = row_ptr[x] & ~0x8000; | 72 | rgb555 = row_ptr[x] & ~0x8000; |
73 | 73 | ||
74 | put_bits(&s->pb, 16, rgb555); | 74 | put_bits(&s->pb, 16, rgb555); |
75 | @@ -745,6 +748,11 @@ post_skip : | 75 | @@ -744,6 +747,11 @@ post_skip : |
76 | row_ptr += bi.rowstride; | 76 | row_ptr += bi.rowstride; |
77 | } | 77 | } |
78 | 78 | ||
@@ -84,6 +84,3 @@ index d710eb4f82..4ced9523e2 100644 | |||
84 | block_counter++; | 84 | block_counter++; |
85 | } else { // FOUR COLOR BLOCK | 85 | } else { // FOUR COLOR BLOCK |
86 | block_counter += encode_four_color_block(min_color, max_color, | 86 | block_counter += encode_four_color_block(min_color, max_color, |
87 | -- | ||
88 | 2.34.1 | ||
89 | |||
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-avcodec-smcenc-stop-accessing-out-of-bounds-frame.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-avcodec-smcenc-stop-accessing-out-of-bounds-frame.patch index 923fc6a9c1..6e237fdd52 100644 --- a/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-avcodec-smcenc-stop-accessing-out-of-bounds-frame.patch +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-avcodec-smcenc-stop-accessing-out-of-bounds-frame.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 13c13109759090b7f7182480d075e13b36ed8edd Mon Sep 17 00:00:00 2001 | 1 | From d2f31887df2c42948dba7446c475026fdbc69336 Mon Sep 17 00:00:00 2001 |
2 | From: Paul B Mahol <onemda@gmail.com> | 2 | From: Paul B Mahol <onemda@gmail.com> |
3 | Date: Sat, 12 Nov 2022 15:19:21 +0100 | 3 | Date: Sat, 12 Nov 2022 15:19:21 +0100 |
4 | Subject: [PATCH] avcodec/smcenc: stop accessing out of bounds frame | 4 | Subject: [PATCH] avcodec/smcenc: stop accessing out of bounds frame |
@@ -12,7 +12,7 @@ Signed-off-by: <narpat.mali@windriver.com> | |||
12 | 1 file changed, 14 insertions(+), 4 deletions(-) | 12 | 1 file changed, 14 insertions(+), 4 deletions(-) |
13 | 13 | ||
14 | diff --git a/libavcodec/smcenc.c b/libavcodec/smcenc.c | 14 | diff --git a/libavcodec/smcenc.c b/libavcodec/smcenc.c |
15 | index f3d26a4e8d..33549b8ab4 100644 | 15 | index 52795ef..618dc4e 100644 |
16 | --- a/libavcodec/smcenc.c | 16 | --- a/libavcodec/smcenc.c |
17 | +++ b/libavcodec/smcenc.c | 17 | +++ b/libavcodec/smcenc.c |
18 | @@ -61,6 +61,7 @@ typedef struct SMCContext { | 18 | @@ -61,6 +61,7 @@ typedef struct SMCContext { |
@@ -103,6 +103,3 @@ index f3d26a4e8d..33549b8ab4 100644 | |||
103 | 103 | ||
104 | blocks = coded_blocks; | 104 | blocks = coded_blocks; |
105 | distinct = coded_distinct; | 105 | distinct = coded_distinct; |
106 | -- | ||
107 | 2.34.1 | ||
108 | |||
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-avcodec-vp3-Add-missing-check-for-av_malloc.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-avcodec-vp3-Add-missing-check-for-av_malloc.patch index 94858a6cdd..dca7c827e3 100644 --- a/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-avcodec-vp3-Add-missing-check-for-av_malloc.patch +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-avcodec-vp3-Add-missing-check-for-av_malloc.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 656cb0450aeb73b25d7d26980af342b37ac4c568 Mon Sep 17 00:00:00 2001 | 1 | From ef748a8bd8720416b673e1743e5673a801e8279f Mon Sep 17 00:00:00 2001 |
2 | From: Jiasheng Jiang <jiasheng@iscas.ac.cn> | 2 | From: Jiasheng Jiang <jiasheng@iscas.ac.cn> |
3 | Date: Tue, 15 Feb 2022 17:58:08 +0800 | 3 | Date: Tue, 15 Feb 2022 17:58:08 +0800 |
4 | Subject: [PATCH] avcodec/vp3: Add missing check for av_malloc | 4 | Subject: [PATCH] avcodec/vp3: Add missing check for av_malloc |
@@ -16,16 +16,17 @@ CVE: CVE-2022-3109 | |||
16 | Upstream-Status: Backport [https://github.com/FFmpeg/FFmpeg/commit/656cb0450aeb73b25d7d26980af342b37ac4c568] | 16 | Upstream-Status: Backport [https://github.com/FFmpeg/FFmpeg/commit/656cb0450aeb73b25d7d26980af342b37ac4c568] |
17 | 17 | ||
18 | Signed-off-by: Narpat Mali <narpat.mali@windriver.com> | 18 | Signed-off-by: Narpat Mali <narpat.mali@windriver.com> |
19 | |||
19 | --- | 20 | --- |
20 | libavcodec/vp3.c | 7 ++++++- | 21 | libavcodec/vp3.c | 7 ++++++- |
21 | 1 file changed, 6 insertions(+), 1 deletion(-) | 22 | 1 file changed, 6 insertions(+), 1 deletion(-) |
22 | 23 | ||
23 | diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c | 24 | diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c |
24 | index e9ab54d736..e2418eb6fa 100644 | 25 | index 5b9ba60..f1eccfe 100644 |
25 | --- a/libavcodec/vp3.c | 26 | --- a/libavcodec/vp3.c |
26 | +++ b/libavcodec/vp3.c | 27 | +++ b/libavcodec/vp3.c |
27 | @@ -2679,8 +2679,13 @@ static int vp3_decode_frame(AVCodecContext *avctx, | 28 | @@ -2677,8 +2677,13 @@ static int vp3_decode_frame(AVCodecContext *avctx, |
28 | AV_GET_BUFFER_FLAG_REF)) < 0) | 29 | if ((ret = ff_thread_get_buffer(avctx, &s->current_frame, AV_GET_BUFFER_FLAG_REF)) < 0) |
29 | goto error; | 30 | goto error; |
30 | 31 | ||
31 | - if (!s->edge_emu_buffer) | 32 | - if (!s->edge_emu_buffer) |
@@ -39,6 +40,3 @@ index e9ab54d736..e2418eb6fa 100644 | |||
39 | 40 | ||
40 | if (s->keyframe) { | 41 | if (s->keyframe) { |
41 | if (!s->theora) { | 42 | if (!s->theora) { |
42 | -- | ||
43 | 2.34.1 | ||
44 | |||