Commit f9240ec0 authored by Clément Bœsch's avatar Clément Bœsch

avcodec/gif: fix off by one in column offsetting finding

parent e40e446e
...@@ -108,7 +108,7 @@ static int gif_image_write_image(AVCodecContext *avctx, ...@@ -108,7 +108,7 @@ static int gif_image_write_image(AVCodecContext *avctx,
/* skip common columns */ /* skip common columns */
while (x_start < x_end) { while (x_start < x_end) {
int same_column = 1; int same_column = 1;
for (y = y_start; y < y_end; y++) { for (y = y_start; y <= y_end; y++) {
if (ref[y*ref_linesize + x_start] != buf[y*linesize + x_start]) { if (ref[y*ref_linesize + x_start] != buf[y*linesize + x_start]) {
same_column = 0; same_column = 0;
break; break;
...@@ -120,7 +120,7 @@ static int gif_image_write_image(AVCodecContext *avctx, ...@@ -120,7 +120,7 @@ static int gif_image_write_image(AVCodecContext *avctx,
} }
while (x_end > x_start) { while (x_end > x_start) {
int same_column = 1; int same_column = 1;
for (y = y_start; y < y_end; y++) { for (y = y_start; y <= y_end; y++) {
if (ref[y*ref_linesize + x_end] != buf[y*linesize + x_end]) { if (ref[y*ref_linesize + x_end] != buf[y*linesize + x_end]) {
same_column = 0; same_column = 0;
break; break;
......
...@@ -35,15 +35,15 @@ ...@@ -35,15 +35,15 @@
0, 33, 33, 1, 4295, 0xf71b0b38, S=1, 1024, 0xf351799f 0, 33, 33, 1, 4295, 0xf71b0b38, S=1, 1024, 0xf351799f
0, 34, 34, 1, 2044, 0x5adcb93b, S=1, 1024, 0xf351799f 0, 34, 34, 1, 2044, 0x5adcb93b, S=1, 1024, 0xf351799f
0, 35, 35, 1, 3212, 0xcf79eeed, S=1, 1024, 0xf351799f 0, 35, 35, 1, 3212, 0xcf79eeed, S=1, 1024, 0xf351799f
0, 36, 36, 1, 2281, 0x68464d30, S=1, 1024, 0xf351799f 0, 36, 36, 1, 2292, 0xb4386334, S=1, 1024, 0xf351799f
0, 37, 37, 1, 3633, 0x0010992f, S=1, 1024, 0xf351799f 0, 37, 37, 1, 3633, 0x0010992f, S=1, 1024, 0xf351799f
0, 38, 38, 1, 3552, 0x23697490, S=1, 1024, 0xf351799f 0, 38, 38, 1, 3552, 0x23697490, S=1, 1024, 0xf351799f
0, 39, 39, 1, 3690, 0x62afdbb8, S=1, 1024, 0xf351799f 0, 39, 39, 1, 3690, 0x62afdbb8, S=1, 1024, 0xf351799f
0, 40, 40, 1, 1558, 0x7a13e53b, S=1, 1024, 0xf351799f 0, 40, 40, 1, 1559, 0x5baef54a, S=1, 1024, 0xf351799f
0, 41, 41, 1, 940, 0xb1b6cba2, S=1, 1024, 0xf351799f 0, 41, 41, 1, 954, 0xca75ca79, S=1, 1024, 0xf351799f
0, 42, 42, 1, 273, 0x3687799b, S=1, 1024, 0xf351799f 0, 42, 42, 1, 273, 0x3687799b, S=1, 1024, 0xf351799f
0, 43, 43, 1, 930, 0x29f3b0c4, S=1, 1024, 0xf351799f 0, 43, 43, 1, 930, 0x29f3b0c4, S=1, 1024, 0xf351799f
0, 44, 44, 1, 271, 0xe7af807c, S=1, 1024, 0xf351799f 0, 44, 44, 1, 271, 0x305e8094, S=1, 1024, 0xf351799f
0, 45, 45, 1, 196, 0xf5ab51ee, S=1, 1024, 0xf351799f 0, 45, 45, 1, 196, 0xf5ab51ee, S=1, 1024, 0xf351799f
0, 46, 46, 1, 4299, 0x67ec0d55, S=1, 1024, 0xf351799f 0, 46, 46, 1, 4299, 0x67ec0d55, S=1, 1024, 0xf351799f
0, 47, 47, 1, 4895, 0xb394406c, S=1, 1024, 0xf351799f 0, 47, 47, 1, 4895, 0xb394406c, S=1, 1024, 0xf351799f
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
0, 54, 54, 1, 5179, 0x860fc6a1, S=1, 1024, 0xf351799f 0, 54, 54, 1, 5179, 0x860fc6a1, S=1, 1024, 0xf351799f
0, 55, 55, 1, 5046, 0xce9183d3, S=1, 1024, 0xf351799f 0, 55, 55, 1, 5046, 0xce9183d3, S=1, 1024, 0xf351799f
0, 56, 56, 1, 5140, 0xa6d7b9af, S=1, 1024, 0xf351799f 0, 56, 56, 1, 5140, 0xa6d7b9af, S=1, 1024, 0xf351799f
0, 57, 57, 1, 4289, 0xb415f717, S=1, 1024, 0xf351799f 0, 57, 57, 1, 4301, 0x03b6ef3f, S=1, 1024, 0xf351799f
0, 58, 58, 1, 5079, 0xa8d59e01, S=1, 1024, 0xf351799f 0, 58, 58, 1, 5079, 0xa8d59e01, S=1, 1024, 0xf351799f
0, 59, 59, 1, 5284, 0xea34e3b3, S=1, 1024, 0xf351799f 0, 59, 59, 1, 5284, 0xea34e3b3, S=1, 1024, 0xf351799f
0, 60, 60, 1, 5426, 0x556a15cd, S=1, 1024, 0xf351799f 0, 60, 60, 1, 5426, 0x556a15cd, S=1, 1024, 0xf351799f
......
...@@ -35,15 +35,15 @@ ...@@ -35,15 +35,15 @@
0, 33, 33, 1, 4295, 0xf71b0b38, S=1, 1024, 0xf351799f 0, 33, 33, 1, 4295, 0xf71b0b38, S=1, 1024, 0xf351799f
0, 34, 34, 1, 2044, 0x5adcb93b, S=1, 1024, 0xf351799f 0, 34, 34, 1, 2044, 0x5adcb93b, S=1, 1024, 0xf351799f
0, 35, 35, 1, 3212, 0xcf79eeed, S=1, 1024, 0xf351799f 0, 35, 35, 1, 3212, 0xcf79eeed, S=1, 1024, 0xf351799f
0, 36, 36, 1, 2281, 0x68464d30, S=1, 1024, 0xf351799f 0, 36, 36, 1, 2292, 0xb4386334, S=1, 1024, 0xf351799f
0, 37, 37, 1, 3633, 0x0010992f, S=1, 1024, 0xf351799f 0, 37, 37, 1, 3633, 0x0010992f, S=1, 1024, 0xf351799f
0, 38, 38, 1, 3552, 0x23697490, S=1, 1024, 0xf351799f 0, 38, 38, 1, 3552, 0x23697490, S=1, 1024, 0xf351799f
0, 39, 39, 1, 3690, 0x62afdbb8, S=1, 1024, 0xf351799f 0, 39, 39, 1, 3690, 0x62afdbb8, S=1, 1024, 0xf351799f
0, 40, 40, 1, 1558, 0x7a13e53b, S=1, 1024, 0xf351799f 0, 40, 40, 1, 1559, 0x5baef54a, S=1, 1024, 0xf351799f
0, 41, 41, 1, 940, 0xb1b6cba2, S=1, 1024, 0xf351799f 0, 41, 41, 1, 954, 0xca75ca79, S=1, 1024, 0xf351799f
0, 42, 42, 1, 273, 0x3687799b, S=1, 1024, 0xf351799f 0, 42, 42, 1, 273, 0x3687799b, S=1, 1024, 0xf351799f
0, 43, 43, 1, 930, 0x29f3b0c4, S=1, 1024, 0xf351799f 0, 43, 43, 1, 930, 0x29f3b0c4, S=1, 1024, 0xf351799f
0, 44, 44, 1, 271, 0xe7af807c, S=1, 1024, 0xf351799f 0, 44, 44, 1, 271, 0x305e8094, S=1, 1024, 0xf351799f
0, 45, 45, 1, 196, 0xf5ab51ee, S=1, 1024, 0xf351799f 0, 45, 45, 1, 196, 0xf5ab51ee, S=1, 1024, 0xf351799f
0, 46, 46, 1, 4299, 0x67ec0d55, S=1, 1024, 0xf351799f 0, 46, 46, 1, 4299, 0x67ec0d55, S=1, 1024, 0xf351799f
0, 47, 47, 1, 4895, 0xb394406c, S=1, 1024, 0xf351799f 0, 47, 47, 1, 4895, 0xb394406c, S=1, 1024, 0xf351799f
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
0, 54, 54, 1, 5179, 0x860fc6a1, S=1, 1024, 0xf351799f 0, 54, 54, 1, 5179, 0x860fc6a1, S=1, 1024, 0xf351799f
0, 55, 55, 1, 5046, 0xce9183d3, S=1, 1024, 0xf351799f 0, 55, 55, 1, 5046, 0xce9183d3, S=1, 1024, 0xf351799f
0, 56, 56, 1, 5140, 0xa6d7b9af, S=1, 1024, 0xf351799f 0, 56, 56, 1, 5140, 0xa6d7b9af, S=1, 1024, 0xf351799f
0, 57, 57, 1, 4289, 0xb415f717, S=1, 1024, 0xf351799f 0, 57, 57, 1, 4301, 0x03b6ef3f, S=1, 1024, 0xf351799f
0, 58, 58, 1, 5079, 0xa8d59e01, S=1, 1024, 0xf351799f 0, 58, 58, 1, 5079, 0xa8d59e01, S=1, 1024, 0xf351799f
0, 59, 59, 1, 5284, 0xea34e3b3, S=1, 1024, 0xf351799f 0, 59, 59, 1, 5284, 0xea34e3b3, S=1, 1024, 0xf351799f
0, 60, 60, 1, 5426, 0x556a15cd, S=1, 1024, 0xf351799f 0, 60, 60, 1, 5426, 0x556a15cd, S=1, 1024, 0xf351799f
......
...@@ -35,15 +35,15 @@ ...@@ -35,15 +35,15 @@
0, 33, 33, 1, 4295, 0xc1850a80, S=1, 1024, 0xcfc8799f 0, 33, 33, 1, 4295, 0xc1850a80, S=1, 1024, 0xcfc8799f
0, 34, 34, 1, 2044, 0x0440c072, S=1, 1024, 0xcfc8799f 0, 34, 34, 1, 2044, 0x0440c072, S=1, 1024, 0xcfc8799f
0, 35, 35, 1, 3212, 0xe91af08f, S=1, 1024, 0xcfc8799f 0, 35, 35, 1, 3212, 0xe91af08f, S=1, 1024, 0xcfc8799f
0, 36, 36, 1, 2281, 0x6a414aa1, S=1, 1024, 0xcfc8799f 0, 36, 36, 1, 2292, 0x6765633e, S=1, 1024, 0xcfc8799f
0, 37, 37, 1, 3633, 0xac779aa3, S=1, 1024, 0xcfc8799f 0, 37, 37, 1, 3633, 0xac779aa3, S=1, 1024, 0xcfc8799f
0, 38, 38, 1, 3552, 0xed2c75b2, S=1, 1024, 0xcfc8799f 0, 38, 38, 1, 3552, 0xed2c75b2, S=1, 1024, 0xcfc8799f
0, 39, 39, 1, 3690, 0x2020dd0d, S=1, 1024, 0xcfc8799f 0, 39, 39, 1, 3690, 0x2020dd0d, S=1, 1024, 0xcfc8799f
0, 40, 40, 1, 1558, 0x2c14e4b2, S=1, 1024, 0xcfc8799f 0, 40, 40, 1, 1559, 0x596ef330, S=1, 1024, 0xcfc8799f
0, 41, 41, 1, 940, 0x4927cd90, S=1, 1024, 0xcfc8799f 0, 41, 41, 1, 954, 0xac12c9c5, S=1, 1024, 0xcfc8799f
0, 42, 42, 1, 273, 0x138c7831, S=1, 1024, 0xcfc8799f 0, 42, 42, 1, 273, 0x138c7831, S=1, 1024, 0xcfc8799f
0, 43, 43, 1, 930, 0xf1c3ae3f, S=1, 1024, 0xcfc8799f 0, 43, 43, 1, 930, 0xf1c3ae3f, S=1, 1024, 0xcfc8799f
0, 44, 44, 1, 271, 0x6d338044, S=1, 1024, 0xcfc8799f 0, 44, 44, 1, 271, 0x921a80af, S=1, 1024, 0xcfc8799f
0, 45, 45, 1, 196, 0xa5de5322, S=1, 1024, 0xcfc8799f 0, 45, 45, 1, 196, 0xa5de5322, S=1, 1024, 0xcfc8799f
0, 46, 46, 1, 4299, 0x5bac0d86, S=1, 1024, 0xcfc8799f 0, 46, 46, 1, 4299, 0x5bac0d86, S=1, 1024, 0xcfc8799f
0, 47, 47, 1, 4895, 0xc43639a6, S=1, 1024, 0xcfc8799f 0, 47, 47, 1, 4895, 0xc43639a6, S=1, 1024, 0xcfc8799f
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
0, 54, 54, 1, 5179, 0x97aac3a1, S=1, 1024, 0xcfc8799f 0, 54, 54, 1, 5179, 0x97aac3a1, S=1, 1024, 0xcfc8799f
0, 55, 55, 1, 5046, 0x836a80cd, S=1, 1024, 0xcfc8799f 0, 55, 55, 1, 5046, 0x836a80cd, S=1, 1024, 0xcfc8799f
0, 56, 56, 1, 5140, 0xa725c1e7, S=1, 1024, 0xcfc8799f 0, 56, 56, 1, 5140, 0xa725c1e7, S=1, 1024, 0xcfc8799f
0, 57, 57, 1, 4289, 0x7b3afbc0, S=1, 1024, 0xcfc8799f 0, 57, 57, 1, 4301, 0x0203f239, S=1, 1024, 0xcfc8799f
0, 58, 58, 1, 5079, 0xb2e7a2de, S=1, 1024, 0xcfc8799f 0, 58, 58, 1, 5079, 0xb2e7a2de, S=1, 1024, 0xcfc8799f
0, 59, 59, 1, 5284, 0xb757dfe1, S=1, 1024, 0xcfc8799f 0, 59, 59, 1, 5284, 0xb757dfe1, S=1, 1024, 0xcfc8799f
0, 60, 60, 1, 5426, 0xf9f11e57, S=1, 1024, 0xcfc8799f 0, 60, 60, 1, 5426, 0xf9f11e57, S=1, 1024, 0xcfc8799f
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment