summaryrefslogtreecommitdiff
path: root/app-editors/hteditor/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-03-23 04:19:44 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-03-23 04:19:44 +0000
commitc5283d322accc6097afec74eab24550829788bab (patch)
treeb99ce668128d82a026eaa31461643f9173f9b77b /app-editors/hteditor/files
parent5510d9d7d1c93c2ea71a2bd6f0666168808d5dd6 (diff)
gentoo resync : 23.03.2018
Diffstat (limited to 'app-editors/hteditor/files')
-rw-r--r--app-editors/hteditor/files/hteditor-2.1.0-format-security.patch57
-rw-r--r--app-editors/hteditor/files/hteditor-2.1.0-gcc-6-uchar.patch45
2 files changed, 102 insertions, 0 deletions
diff --git a/app-editors/hteditor/files/hteditor-2.1.0-format-security.patch b/app-editors/hteditor/files/hteditor-2.1.0-format-security.patch
new file mode 100644
index 000000000000..408d1b9b1be3
--- /dev/null
+++ b/app-editors/hteditor/files/hteditor-2.1.0-format-security.patch
@@ -0,0 +1,57 @@
+https://bugs.gentoo.org/521018
+
+From 5839355d67ff822593190473a41512ca19e4280a Mon Sep 17 00:00:00 2001
+From: Anton Gladky <gladk@debian.org>
+Date: Wed, 18 Feb 2015 21:20:39 +0100
+Subject: [PATCH] Fix "format not a string" compilation failure
+
+Compilation with the flag -Werror=format-security fails with
+the message:
+
+error: format not a string literal and no format arguments
+
+This patch solves the issue.
+---
+ asm/x86dis.cc | 6 +++---
+ htpal.cc | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/asm/x86dis.cc b/asm/x86dis.cc
+index 0830d9c..bb9028f 100644
+--- a/asm/x86dis.cc
++++ b/asm/x86dis.cc
+@@ -1218,15 +1218,15 @@ void x86dis::str_op(char *opstr, int *opstrlen, x86dis_insn *insn, x86_insn_op *
+ default: {assert(0);}
+ }
+ if (!insn->rexprefix) {
+- sprintf(opstr, x86_regs[j][op->reg]);
++ sprintf(opstr, "%s", x86_regs[j][op->reg]);
+ } else {
+- sprintf(opstr, x86_64regs[j][op->reg]);
++ sprintf(opstr, "%s", x86_64regs[j][op->reg]);
+ }
+ break;
+ }
+ case X86_OPTYPE_SEG:
+ if (x86_segs[op->seg]) {
+- sprintf(opstr, x86_segs[op->seg]);
++ sprintf(opstr, "%s", x86_segs[op->seg]);
+ }
+ break;
+ case X86_OPTYPE_CRX:
+diff --git a/htpal.cc b/htpal.cc
+index 03dea18..3d5f51e 100644
+--- a/htpal.cc
++++ b/htpal.cc
+@@ -307,7 +307,7 @@ void palette_entry::strvalue(char *buf32bytes)
+ text = "normal";
+ }
+ p = tag_make_color(p, 32, VCP(fg, bg));
+- p += sprintf(p, text);
++ p += sprintf(p, "%s", text);
+ p = tag_make_default_color(p, 32);
+ *p = 0;
+ }
+--
+2.16.2
+
diff --git a/app-editors/hteditor/files/hteditor-2.1.0-gcc-6-uchar.patch b/app-editors/hteditor/files/hteditor-2.1.0-gcc-6-uchar.patch
new file mode 100644
index 000000000000..67eaa6e01491
--- /dev/null
+++ b/app-editors/hteditor/files/hteditor-2.1.0-gcc-6-uchar.patch
@@ -0,0 +1,45 @@
+https://github.com/sebastianbiallas/ht/pull/21
+
+From 7ce68c4bca7fd64c0073f1770c6b5761c03174f0 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Wed, 21 Mar 2018 21:30:31 +0000
+Subject: [PATCH] ht: fix build failure on -funsigned-char platforms
+
+powerpc (and arm) have 'char' == 'unsigned char' by default.
+This causes build failures on c++11:
+
+```
+$ ./configure CFLAGS=-funsigned-char CXXFLAGS=-funsigned-char
+$ make
+
+g++ -DHAVE_CONFIG_H -I. -I./analyser -I./asm -I./info -I./io/posix -I./io -I./output -I./eval -I. -DNOMACROS -pipe -O3 -fomit-frame-pointer -Wall -fsigned-char -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -std=c++14 -Woverloaded-virtual -Wnon-virtual-dtor -funsigned-char -MT htcoffhd.o -MD -MP -MF .deps/htcoffhd.Tpo -c -o htcoffhd.o htcoffhd.cc
+htcoffhd.cc:93:1: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
+ };
+ ^
+htcoffhd.cc:131:1: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
+ };
+```
+
+Use 'signed char' explicitly to maintain existing behavior.
+
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ httag.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/httag.h b/httag.h
+index 7f5da1c..83e5c22 100644
+--- a/httag.h
++++ b/httag.h
+@@ -69,7 +69,7 @@ struct ht_tag_flags {
+ } PACKED;
+
+ struct ht_tag_flags_s {
+- char bitidx;
++ signed char bitidx;
+ const char *desc;
+ } PACKED;
+
+--
+2.16.2
+