summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--audio/libsidplay2/distinfo4
-rw-r--r--audio/libsidplay2/patches/patch-libsidplay_src_xsid_xsid.cpp19
-rw-r--r--audio/libsidplay2/patches/patch-libsidplay_src_xsid_xsid.h13
3 files changed, 35 insertions, 1 deletions
diff --git a/audio/libsidplay2/distinfo b/audio/libsidplay2/distinfo
index f699bb2512d..cb76f8cd959 100644
--- a/audio/libsidplay2/distinfo
+++ b/audio/libsidplay2/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.8 2015/11/03 01:12:38 agc Exp $
+$NetBSD: distinfo,v 1.9 2020/12/26 19:54:14 nat Exp $
SHA1 (sidplay-libs-2.1.1.tar.gz) = 8af6350866edc30b0d331e075fa97292f6f645a5
RMD160 (sidplay-libs-2.1.1.tar.gz) = 1ce4c3cb80470a834c5887b3f3be0b61ca71e4cd
@@ -11,4 +11,6 @@ SHA1 (patch-builders_hardsid-builder_src_hardsid-builder.cpp) = cc3001b12d3f18d5
SHA1 (patch-builders_resid-builder_src_resid-builder.cpp) = 46d3686eb67256397458df1eac2c017465b616d8
SHA1 (patch-builders_resid-builder_src_resid.cpp) = db9f0bf3658c38e88eba7ced3f6102587558160d
SHA1 (patch-libsidplay_src_sidtune_SidTune.cpp) = 20f2a2f36db8c08989ad1239da15a91d82cd2a2f
+SHA1 (patch-libsidplay_src_xsid_xsid.cpp) = 5991e8efd3e648a344fb77468d9917617cff0530
+SHA1 (patch-libsidplay_src_xsid_xsid.h) = 61ca52d027afe5af2d22e044bf346f7a384a362d
SHA1 (patch-resid_sid.cc) = 88da243fab096f6b532af111c1d23ebc64ece632
diff --git a/audio/libsidplay2/patches/patch-libsidplay_src_xsid_xsid.cpp b/audio/libsidplay2/patches/patch-libsidplay_src_xsid_xsid.cpp
new file mode 100644
index 00000000000..089f5e62479
--- /dev/null
+++ b/audio/libsidplay2/patches/patch-libsidplay_src_xsid_xsid.cpp
@@ -0,0 +1,19 @@
+$NetBSD: patch-libsidplay_src_xsid_xsid.cpp,v 1.1 2020/12/26 19:54:14 nat Exp $
+Requires unsigned type to avoid overflow.
+Express data in hex.
+--- libsidplay/src/xsid/xsid.cpp.orig 2004-06-14 20:08:02.000000000 +0000
++++ libsidplay/src/xsid/xsid.cpp
+@@ -94,10 +94,10 @@ const int8_t XSID::sampleConvertTable[16
+ '\x08', '\x19', '\x2a', '\x3b', '\x4c', '\x5d', '\x6e', '\x7f'
+ };
+ */
+-const int8_t XSID::sampleConvertTable[16] =
++const uint8_t XSID::sampleConvertTable[16] =
+ {
+- '\x80', '\x94', '\xa9', '\xbc', '\xce', '\xe1', '\xf2', '\x03',
+- '\x1b', '\x2a', '\x3b', '\x49', '\x58', '\x66', '\x73', '\x7f'
++ 0x80, 0x94, 0xa9, 0xbc, 0xce, 0xe1, 0xf2, 0x03,
++ 0x1b, 0x2a, 0x3b, 0x49, 0x58, 0x66, 0x73, 0x7f
+ };
+
+ const char *XSID::credit =
diff --git a/audio/libsidplay2/patches/patch-libsidplay_src_xsid_xsid.h b/audio/libsidplay2/patches/patch-libsidplay_src_xsid_xsid.h
new file mode 100644
index 00000000000..7d73958aa31
--- /dev/null
+++ b/audio/libsidplay2/patches/patch-libsidplay_src_xsid_xsid.h
@@ -0,0 +1,13 @@
+$NetBSD: patch-libsidplay_src_xsid_xsid.h,v 1.1 2020/12/26 19:54:14 nat Exp $
+Requires unsigned type to avoid overflow.
+--- libsidplay/src/xsid/xsid.h.orig 2004-06-14 20:08:02.000000000 +0000
++++ libsidplay/src/xsid/xsid.h
+@@ -238,7 +238,7 @@ private:
+ uint8_t sidData0x18;
+ bool _sidSamples;
+ int8_t sampleOffset;
+- static const int8_t sampleConvertTable[16];
++ static const uint8_t sampleConvertTable[16];
+ bool wasRunning;
+
+ private: