1 |
Gentoo-Bug: 143897 |
2 |
Package-Manager: Portage-2.3.5, Repoman-2.3.1 |
3 |
--- |
4 |
app-crypt/outguess/Manifest | 1 + |
5 |
...utguess-0.2-avoid-implicit-function-usage.patch | 53 ++++++++++++++++++++++ |
6 |
.../outguess-0.2-fix-printf-argument-types.patch | 34 ++++++++++++++ |
7 |
...0.2-fix-segfault-when-encoding-PNM-images.patch | 29 ++++++++++++ |
8 |
.../outguess-0.2-pass-struct-size-to-memset.patch | 25 ++++++++++ |
9 |
app-crypt/outguess/metadata.xml | 19 ++++++++ |
10 |
app-crypt/outguess/outguess-0.2-r1.ebuild | 27 +++++++++++ |
11 |
7 files changed, 188 insertions(+) |
12 |
create mode 100644 app-crypt/outguess/Manifest |
13 |
create mode 100644 app-crypt/outguess/files/outguess-0.2-avoid-implicit-function-usage.patch |
14 |
create mode 100644 app-crypt/outguess/files/outguess-0.2-fix-printf-argument-types.patch |
15 |
create mode 100644 app-crypt/outguess/files/outguess-0.2-fix-segfault-when-encoding-PNM-images.patch |
16 |
create mode 100644 app-crypt/outguess/files/outguess-0.2-pass-struct-size-to-memset.patch |
17 |
create mode 100644 app-crypt/outguess/metadata.xml |
18 |
create mode 100644 app-crypt/outguess/outguess-0.2-r1.ebuild |
19 |
|
20 |
diff --git a/app-crypt/outguess/Manifest b/app-crypt/outguess/Manifest |
21 |
new file mode 100644 |
22 |
index 00000000000..82f73b4f8d1 |
23 |
--- /dev/null |
24 |
+++ b/app-crypt/outguess/Manifest |
25 |
@@ -0,0 +1 @@ |
26 |
+DIST outguess-0.2.tar.gz 470638 SHA256 2f951ed7b9b9373fae8fe95616d49c83ae246cf53a2b60a82814228515bfa7d6 SHA512 2901e2e8f6495f1483897bfde2a84b658335aa733f3ad16959e6b906dec8675c72f5468a0f60b14d231ff64b7768be2cf06be6bbd833286f07a632a9ca45a1e6 WHIRLPOOL e7dca23e1074aeeba817b0ac57f835ca46bfce423735de4b41badafc95313d28c610b84728c91606f03f87f3c8785e714a2f233fda8a980c19bf0e8ca17ca10d |
27 |
diff --git a/app-crypt/outguess/files/outguess-0.2-avoid-implicit-function-usage.patch b/app-crypt/outguess/files/outguess-0.2-avoid-implicit-function-usage.patch |
28 |
new file mode 100644 |
29 |
index 00000000000..dccf3e90338 |
30 |
--- /dev/null |
31 |
+++ b/app-crypt/outguess/files/outguess-0.2-avoid-implicit-function-usage.patch |
32 |
@@ -0,0 +1,53 @@ |
33 |
+From 425982db66dc038ffeb025e0f87f98b9b95e68f3 Mon Sep 17 00:00:00 2001 |
34 |
+From: Chris Rorvick <chris@×××××××.com> |
35 |
+Date: Wed, 31 Aug 2016 23:27:17 -0500 |
36 |
+Subject: [PATCH] avoid implicit function usage |
37 |
+ |
38 |
+Ensure functions are declared before they are used. |
39 |
+--- |
40 |
+ jpeg-6b-steg/jcdctmgr.c | 2 ++ |
41 |
+ jpeg-6b-steg/jdcoefct.c | 2 ++ |
42 |
+ missing/md5.c | 1 + |
43 |
+ 3 files changed, 5 insertions(+) |
44 |
+ |
45 |
+diff --git a/jpeg-6b-steg/jcdctmgr.c b/jpeg-6b-steg/jcdctmgr.c |
46 |
+index 292648d..b68a7ba 100644 |
47 |
+--- a/jpeg-6b-steg/jcdctmgr.c |
48 |
++++ b/jpeg-6b-steg/jcdctmgr.c |
49 |
+@@ -40,6 +40,8 @@ typedef struct { |
50 |
+ |
51 |
+ typedef my_fdct_controller * my_fdct_ptr; |
52 |
+ |
53 |
++short steg_use_bit (unsigned short temp); |
54 |
++ |
55 |
+ |
56 |
+ /* |
57 |
+ * Initialize for a processing pass. |
58 |
+diff --git a/jpeg-6b-steg/jdcoefct.c b/jpeg-6b-steg/jdcoefct.c |
59 |
+index 6ffe53f..f38f4d5 100644 |
60 |
+--- a/jpeg-6b-steg/jdcoefct.c |
61 |
++++ b/jpeg-6b-steg/jdcoefct.c |
62 |
+@@ -74,6 +74,8 @@ METHODDEF(int) decompress_smooth_data |
63 |
+ JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf)); |
64 |
+ #endif |
65 |
+ |
66 |
++short steg_use_bit (unsigned short temp); |
67 |
++ |
68 |
+ |
69 |
+ LOCAL(void) |
70 |
+ start_iMCU_row (j_decompress_ptr cinfo) |
71 |
+diff --git a/missing/md5.c b/missing/md5.c |
72 |
+index 7cb1d4d..314548a 100644 |
73 |
+--- a/missing/md5.c |
74 |
++++ b/missing/md5.c |
75 |
+@@ -28,6 +28,7 @@ |
76 |
+ #endif |
77 |
+ |
78 |
+ #include "md5.h" |
79 |
++#include <string.h> |
80 |
+ |
81 |
+ /* Little-endian byte-swapping routines. Note that these do not |
82 |
+ depend on the size of datatypes such as uint32, nor do they require |
83 |
+-- |
84 |
+2.9.3 |
85 |
+ |
86 |
diff --git a/app-crypt/outguess/files/outguess-0.2-fix-printf-argument-types.patch b/app-crypt/outguess/files/outguess-0.2-fix-printf-argument-types.patch |
87 |
new file mode 100644 |
88 |
index 00000000000..3142f590025 |
89 |
--- /dev/null |
90 |
+++ b/app-crypt/outguess/files/outguess-0.2-fix-printf-argument-types.patch |
91 |
@@ -0,0 +1,34 @@ |
92 |
+From fab9e5815766d5ed0434b0ab82f17d2a11c9ad6d Mon Sep 17 00:00:00 2001 |
93 |
+From: Chris Rorvick <chris@×××××××.com> |
94 |
+Date: Wed, 31 Aug 2016 23:55:21 -0500 |
95 |
+Subject: [PATCH] fix printf argument types |
96 |
+ |
97 |
+--- |
98 |
+ outguess.c | 4 ++-- |
99 |
+ 1 file changed, 2 insertions(+), 2 deletions(-) |
100 |
+ |
101 |
+diff --git a/outguess.c b/outguess.c |
102 |
+index 557be9e..c0448b6 100644 |
103 |
+--- a/outguess.c |
104 |
++++ b/outguess.c |
105 |
+@@ -693,7 +693,7 @@ do_embed(bitmap *bitmap, u_char *filename, u_char *key, u_int klen, |
106 |
+ if (bitmap->maxcorrect && correctlen > bitmap->maxcorrect) { |
107 |
+ fprintf(stderr, "steg_embed: " |
108 |
+ "message larger than correctable size %d > %d\n", |
109 |
+- correctlen, bitmap->maxcorrect); |
110 |
++ (int)correctlen, (int)bitmap->maxcorrect); |
111 |
+ exit(1); |
112 |
+ } |
113 |
+ |
114 |
+@@ -975,7 +975,7 @@ main(int argc, char **argv) |
115 |
+ if (bitmap.maxcorrect) |
116 |
+ fprintf(stderr, |
117 |
+ "Correctable message size: %d bits, %0.2f%%\n", |
118 |
+- bitmap.maxcorrect, |
119 |
++ (int)bitmap.maxcorrect, |
120 |
+ (float)100*bitmap.maxcorrect/bitmap.bits); |
121 |
+ } |
122 |
+ |
123 |
+-- |
124 |
+2.9.3 |
125 |
+ |
126 |
diff --git a/app-crypt/outguess/files/outguess-0.2-fix-segfault-when-encoding-PNM-images.patch b/app-crypt/outguess/files/outguess-0.2-fix-segfault-when-encoding-PNM-images.patch |
127 |
new file mode 100644 |
128 |
index 00000000000..40c44a21bd6 |
129 |
--- /dev/null |
130 |
+++ b/app-crypt/outguess/files/outguess-0.2-fix-segfault-when-encoding-PNM-images.patch |
131 |
@@ -0,0 +1,29 @@ |
132 |
+From 78096e8fb29f7b639b913472f089f90f9bf21ed2 Mon Sep 17 00:00:00 2001 |
133 |
+From: Chris Rorvick <chris@×××××××.com> |
134 |
+Date: Thu, 1 Sep 2016 00:43:06 -0500 |
135 |
+Subject: [PATCH] fix segfault when encoding PNM images |
136 |
+ |
137 |
+OutGuess 0.2 added the ability to preserve frequency counts in JPEG |
138 |
+images to foil statistical tests. This was stubbed out in the PNM |
139 |
+driver but forgot to do some necessary setup. Assign `bitmap.preserve' |
140 |
+accordingly to avoid calling a null pointer. |
141 |
+--- |
142 |
+ pnm.c | 2 ++ |
143 |
+ 1 file changed, 2 insertions(+) |
144 |
+ |
145 |
+diff --git a/pnm.c b/pnm.c |
146 |
+index 3bfc330..f1aa65d 100644 |
147 |
+--- a/pnm.c |
148 |
++++ b/pnm.c |
149 |
+@@ -63,6 +63,8 @@ init_pnm(char *parameter) |
150 |
+ int |
151 |
+ preserve_pnm(bitmap *bitmap, int off) |
152 |
+ { |
153 |
++ if (off == -1) |
154 |
++ bitmap->preserve = preserve_pnm; |
155 |
+ |
156 |
+ return (-1); |
157 |
+ } |
158 |
+-- |
159 |
+2.9.3 |
160 |
+ |
161 |
diff --git a/app-crypt/outguess/files/outguess-0.2-pass-struct-size-to-memset.patch b/app-crypt/outguess/files/outguess-0.2-pass-struct-size-to-memset.patch |
162 |
new file mode 100644 |
163 |
index 00000000000..f1b1458d428 |
164 |
--- /dev/null |
165 |
+++ b/app-crypt/outguess/files/outguess-0.2-pass-struct-size-to-memset.patch |
166 |
@@ -0,0 +1,25 @@ |
167 |
+From 37a4bf9523f18e5e1b064becf50112d47fae2acd Mon Sep 17 00:00:00 2001 |
168 |
+From: Chris Rorvick <chris@×××××××.com> |
169 |
+Date: Thu, 1 Sep 2016 01:49:14 -0500 |
170 |
+Subject: [PATCH] pass struct size to memset(), not pointer size |
171 |
+ |
172 |
+--- |
173 |
+ missing/md5.c | 2 +- |
174 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
175 |
+ |
176 |
+diff --git a/missing/md5.c b/missing/md5.c |
177 |
+index 314548a..2da3835 100644 |
178 |
+--- a/missing/md5.c |
179 |
++++ b/missing/md5.c |
180 |
+@@ -168,7 +168,7 @@ MD5Final(digest, ctx) |
181 |
+ putu32(ctx->buf[1], digest + 4); |
182 |
+ putu32(ctx->buf[2], digest + 8); |
183 |
+ putu32(ctx->buf[3], digest + 12); |
184 |
+- memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ |
185 |
++ memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ |
186 |
+ } |
187 |
+ |
188 |
+ #ifndef ASM_MD5 |
189 |
+-- |
190 |
+2.9.3 |
191 |
+ |
192 |
diff --git a/app-crypt/outguess/metadata.xml b/app-crypt/outguess/metadata.xml |
193 |
new file mode 100644 |
194 |
index 00000000000..c47298e10ff |
195 |
--- /dev/null |
196 |
+++ b/app-crypt/outguess/metadata.xml |
197 |
@@ -0,0 +1,19 @@ |
198 |
+<?xml version="1.0" encoding="UTF-8"?> |
199 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
200 |
+<pkgmetadata> |
201 |
+ <maintainer type="person"> |
202 |
+ <email>chris@×××××××.com</email> |
203 |
+ <name>Chris Rorvick</name> |
204 |
+ </maintainer> |
205 |
+ <longdescription lang="en"> |
206 |
+ OutGuess is a universal steganographic tool that allows the |
207 |
+ insertion of hidden information into the redundant bits of data |
208 |
+ sources. The nature of the data source is irrelevant to the core of |
209 |
+ OutGuess. The program relies on data specific handlers that will |
210 |
+ extract redundant bits and write them back after modification. In |
211 |
+ this version the PNM and JPEG image formats are supported. In the |
212 |
+ next paragraphs, images will be used as concrete example of data |
213 |
+ objects, though OutGuess can use any kind of data, as long as a |
214 |
+ handler is provided. |
215 |
+ </longdescription> |
216 |
+</pkgmetadata> |
217 |
diff --git a/app-crypt/outguess/outguess-0.2-r1.ebuild b/app-crypt/outguess/outguess-0.2-r1.ebuild |
218 |
new file mode 100644 |
219 |
index 00000000000..69d882b2ad3 |
220 |
--- /dev/null |
221 |
+++ b/app-crypt/outguess/outguess-0.2-r1.ebuild |
222 |
@@ -0,0 +1,27 @@ |
223 |
+# Copyright 1999-2017 Gentoo Foundation |
224 |
+# Distributed under the terms of the GNU General Public License v2 |
225 |
+ |
226 |
+EAPI=6 |
227 |
+ |
228 |
+DESCRIPTION="A universal tool for inserting steganographic information into other data" |
229 |
+HOMEPAGE="http://www.outguess.org/" |
230 |
+SRC_URI="https://dl.packetstormsecurity.net/crypt/stego/outguess-0.2.tar.gz" |
231 |
+ |
232 |
+LICENSE="BSD" |
233 |
+SLOT="0" |
234 |
+KEYWORDS="~amd64 ~x86" |
235 |
+IUSE="" |
236 |
+ |
237 |
+PATCHES=( |
238 |
+ "${FILESDIR}"/${P}-fix-segfault-when-encoding-PNM-images.patch |
239 |
+ "${FILESDIR}"/${P}-pass-struct-size-to-memset.patch |
240 |
+ "${FILESDIR}"/${P}-avoid-implicit-function-usage.patch |
241 |
+ "${FILESDIR}"/${P}-fix-printf-argument-types.patch |
242 |
+) |
243 |
+ |
244 |
+S=${WORKDIR}/${PN} |
245 |
+ |
246 |
+src_install() { |
247 |
+ dobin outguess |
248 |
+ doman outguess.1 |
249 |
+} |
250 |
-- |
251 |
2.13.1 |