summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMamoru Komachi <usata@gentoo.org>2004-08-27 18:39:08 +0000
committerMamoru Komachi <usata@gentoo.org>2004-08-27 18:39:08 +0000
commite6cce1b64af5a8844dd292a8b773a52be2e39f39 (patch)
treedd2e855c488f5ef6ba6a2cf1886b980e119bf1cd /app-text/a2ps/files
parentstable on ppc (diff)
downloadgentoo-2-e6cce1b64af5a8844dd292a8b773a52be2e39f39.tar.gz
gentoo-2-e6cce1b64af5a8844dd292a8b773a52be2e39f39.tar.bz2
gentoo-2-e6cce1b64af5a8844dd292a8b773a52be2e39f39.zip
Security fix: bug #61500. Thanks to vorlon <vorlon@vorlons.info> and Sune Kloppenborg Jeppesen <jaervosz@gentoo.org>.
Diffstat (limited to 'app-text/a2ps/files')
-rw-r--r--app-text/a2ps/files/a2ps-4.13-select-freebsd.patch57
-rw-r--r--app-text/a2ps/files/digest-a2ps-4.13b-r62
-rw-r--r--app-text/a2ps/files/digest-a2ps-4.13c-r12
3 files changed, 61 insertions, 0 deletions
diff --git a/app-text/a2ps/files/a2ps-4.13-select-freebsd.patch b/app-text/a2ps/files/a2ps-4.13-select-freebsd.patch
new file mode 100644
index 000000000000..a2c38898fdc6
--- /dev/null
+++ b/app-text/a2ps/files/a2ps-4.13-select-freebsd.patch
@@ -0,0 +1,57 @@
+--- src/select.c.orig Thu Dec 16 02:04:56 1999
++++ src/select.c Sat Aug 21 12:05:31 2004
+@@ -131,6 +131,36 @@
+ return 1;
+ }
+
++/* escapes the name of a file so that the shell groks it in 'single' q.marks.
++ The resulting pointer has to be free()ed when not longer used. */
++char *
++shell_escape(const char *fn)
++{
++ size_t len = 0;
++ const char *inp;
++ char *retval, *outp;
++
++ for(inp = fn; *inp; ++inp)
++ switch(*inp)
++ {
++ case '\'': len += 4; break;
++ default: len += 1; break;
++ }
++
++ outp = retval = malloc(len + 1);
++ if(!outp)
++ return NULL; /* perhaps one should do better error handling here */
++ for(inp = fn; *inp; ++inp)
++ switch(*inp)
++ {
++ case '\'': *outp++ = '\''; *outp++ = '\\'; *outp++ = '\'', *outp++ = '\''; break;
++ default: *outp++ = *inp; break;
++ }
++ *outp = 0;
++
++ return retval;
++}
++
+ /* What says file about the type of a file (result is malloc'd). NULL
+ if could not be run. */
+
+@@ -144,11 +174,15 @@
+ if (IS_EMPTY (job->file_command))
+ return NULL;
+
++ filename = shell_escape(filename);
++ if(filename == NULL)
++ return NULL;
+ /* Call file(1) with the correct option */
+- command = ALLOCA (char, (2
++ command = ALLOCA (char, (4
+ + strlen (job->file_command)
+ + ustrlen (filename)));
+- sprintf (command, "%s %s", job->file_command, (const char *) filename);
++ sprintf (command, "%s '%s'", job->file_command, (const char *) filename);
++ free(filename);
+ message (msg_tool, (stderr, "Reading pipe: `%s'\n", command));
+ file_out = popen (command, "r");
+
diff --git a/app-text/a2ps/files/digest-a2ps-4.13b-r6 b/app-text/a2ps/files/digest-a2ps-4.13b-r6
new file mode 100644
index 000000000000..91bf8e85e0f3
--- /dev/null
+++ b/app-text/a2ps/files/digest-a2ps-4.13b-r6
@@ -0,0 +1,2 @@
+MD5 0c8e0c31b08c14f7a7198ce967eb3281 a2ps-4.13b.tar.gz 1944289
+MD5 75820c89316d271519e8c5a18c479c1e a2ps-4.13-ja_nls.patch 138290
diff --git a/app-text/a2ps/files/digest-a2ps-4.13c-r1 b/app-text/a2ps/files/digest-a2ps-4.13c-r1
new file mode 100644
index 000000000000..4abfd89450cb
--- /dev/null
+++ b/app-text/a2ps/files/digest-a2ps-4.13c-r1
@@ -0,0 +1,2 @@
+MD5 97164e84ba911e4604155507e0893669 a2ps-4.13c.tar.gz 2395885
+MD5 e315466f75d99c0c1ca563d82f2ace2e a2ps-4.13c-ja_nls.patch.gz 38189