Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/STk lang/STk: fix array index using char



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2b2633c7669e
branches:  trunk
changeset: 430713:2b2633c7669e
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sun May 03 14:49:30 2020 +0000

description:
lang/STk: fix array index using char

diffstat:

 lang/STk/distinfo                        |   3 ++-
 lang/STk/patches/patch-Extensions_jpeg.c |  18 ++++++++++++++++++
 2 files changed, 20 insertions(+), 1 deletions(-)

diffs (37 lines):

diff -r 5d7fba4d83b2 -r 2b2633c7669e lang/STk/distinfo
--- a/lang/STk/distinfo Sun May 03 14:38:36 2020 +0000
+++ b/lang/STk/distinfo Sun May 03 14:49:30 2020 +0000
@@ -1,9 +1,10 @@
-$NetBSD: distinfo,v 1.11 2015/12/29 23:34:43 dholland Exp $
+$NetBSD: distinfo,v 1.12 2020/05/03 14:49:30 rillig Exp $
 
 SHA1 (STk-4.0.1.tar.gz) = 50dc98c2b64db1c9cca54411cb406feb4cb57600
 RMD160 (STk-4.0.1.tar.gz) = 58ad3c66f77a6ab33db5d4ca9f2510d50b6b6f0d
 SHA512 (STk-4.0.1.tar.gz) = c849077edac124f28e2a3531d818234416e143aab994e9ba55c4bbce90bdc8c0d40c3fbe9dd5af6bfe8a10892fe72dac7215a05cb95574ba03426175b26f9c47
 Size (STk-4.0.1.tar.gz) = 3673684 bytes
+SHA1 (patch-Extensions_jpeg.c) = 4a962c74ae68e5ea1b838255e466b2274b397ea2
 SHA1 (patch-aa) = 9fc50b3a2167dba7515270f7a9d8fd20bcb8e5c9
 SHA1 (patch-ab) = 3d50bb10bc3bd3d34509d2557f52df367373f3d2
 SHA1 (patch-ac) = 1cf5e558abf54488580b6f1631491280039bb45c
diff -r 5d7fba4d83b2 -r 2b2633c7669e lang/STk/patches/patch-Extensions_jpeg.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/STk/patches/patch-Extensions_jpeg.c  Sun May 03 14:49:30 2020 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-Extensions_jpeg.c,v 1.1 2020/05/03 14:49:30 rillig Exp $
+
+jpeg.c:774:17: error: array subscript has type 'char' [-Werror=char-subscripts]
+    getbits(8, qt[zz[i]]);
+
+Since zz only contains small numbers, the code is ok.
+
+--- Extensions/jpeg.c.orig     1998-01-03 12:46:25.000000000 +0000
++++ Extensions/jpeg.c
+@@ -198,7 +198,7 @@ static unsigned char JPEG_CAC_HuffVals[]
+ #define JPEG_EXTEND(v, t) \
+   ((v) < (1 << (t-1) ) ? (v) + (((-1) << t) + 1) : (v))
+ 
+-static const char zz[] = { 0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18,
++static const unsigned char zz[] = { 0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18,
+                              11, 4, 5, 12, 19, 26, 33, 40, 48, 41, 34,
+                              27, 20, 13, 6, 7, 14, 21, 28, 35, 42, 49,
+                              56, 57, 50, 43, 36, 29, 22, 15, 23, 30,



Home | Main Index | Thread Index | Old Index