summaryrefslogtreecommitdiff
path: root/security/putty
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2012-11-01 19:32:44 +0000
committerjoerg <joerg@pkgsrc.org>2012-11-01 19:32:44 +0000
commit323960c9345ed763d028bfe9eb556b17f1d7cc44 (patch)
tree6537bb6f3cc71c9cd1ae92d8155c33f91581f7b2 /security/putty
parent87879e68d580a6ac0408d40e6aee7654eca3137c (diff)
downloadpkgsrc-323960c9345ed763d028bfe9eb556b17f1d7cc44.tar.gz
Don't order function pointers directly. Don't use non-literals as format
strings. Fix return type of intermediate used for return value of wcrtomb.
Diffstat (limited to 'security/putty')
-rw-r--r--security/putty/distinfo8
-rw-r--r--security/putty/patches/patch-terminal.c4
-rw-r--r--security/putty/patches/patch-timing.c28
-rw-r--r--security/putty/patches/patch-unix_gtkwin.c4
-rw-r--r--security/putty/patches/patch-unix_uxucs.c13
5 files changed, 50 insertions, 7 deletions
diff --git a/security/putty/distinfo b/security/putty/distinfo
index 067e9a8fbfb..1b0d6bbc401 100644
--- a/security/putty/distinfo
+++ b/security/putty/distinfo
@@ -1,13 +1,15 @@
-$NetBSD: distinfo,v 1.12 2012/05/07 01:14:14 dholland Exp $
+$NetBSD: distinfo,v 1.13 2012/11/01 19:32:44 joerg Exp $
SHA1 (putty-0.62.tar.gz) = 5898438614117ee7e3704fc3f30a3c4bf2041380
RMD160 (putty-0.62.tar.gz) = 48324416005eb4b14654fc9e0e14d39f20971507
Size (putty-0.62.tar.gz) = 1783106 bytes
SHA1 (patch-import.c) = c2dc26aa851a326ea89e782ef93ae7bfdc916366
SHA1 (patch-ldisc.c) = e4dd89bfb2ddcb47aad46cc7c311f424aa6ab6be
-SHA1 (patch-terminal.c) = 48c3c928711bf7f461c0fd66490b0412f165f75b
+SHA1 (patch-terminal.c) = bed37a83bb7afc56ff34d48f8079b37d9db0f948
+SHA1 (patch-timing.c) = b836da7194aa72ac88d94951070dc65f11978703
SHA1 (patch-unix_Makefile.gtk) = 0ad8226e2ad8e6e40d3eb9ddef4b22e7d07b7895
SHA1 (patch-unix_gtkfont_c) = 0e57d4f49466ac73fb0d8cc8efb635e6f8a37f44
-SHA1 (patch-unix_gtkwin.c) = ead5e3dea292e6054afa3b9b1a9bc93fc1aff642
+SHA1 (patch-unix_gtkwin.c) = c62d1888b93476972180d14b1fd06d0ab8c8b04b
SHA1 (patch-unix_uxnet.c) = 50e39093ece97b189da4a736713b59ed72c162d9
+SHA1 (patch-unix_uxucs.c) = c8a2c4a5f0f50a0c87ec643acd7a02f16dba576f
SHA1 (patch-windows_window.c) = 0c9f4ad5870e63793278d6f04cae88154611e596
diff --git a/security/putty/patches/patch-terminal.c b/security/putty/patches/patch-terminal.c
index ee2213050f0..2b8c6a15cd0 100644
--- a/security/putty/patches/patch-terminal.c
+++ b/security/putty/patches/patch-terminal.c
@@ -1,4 +1,4 @@
-$NetBSD: patch-terminal.c,v 1.1 2012/02/22 15:27:16 wiz Exp $
+$NetBSD: patch-terminal.c,v 1.2 2012/11/01 19:32:44 joerg Exp $
Make the home/end keys work on BSD servers as well as Linux ones
@@ -32,7 +32,7 @@ Make the home/end keys work on BSD servers as well as Linux ones
+ he = keysym == PK_HOME ? "\x1B[7~" : "\x1B[8~";
+ else
+ he = keysym == PK_HOME ? "\x1BOH" : "\x1BOF";
-+ p += sprintf((char *) p, he);
++ p += sprintf((char *) p, "%s", he);
+ goto done;
+ }
+
diff --git a/security/putty/patches/patch-timing.c b/security/putty/patches/patch-timing.c
new file mode 100644
index 00000000000..36d0925334f
--- /dev/null
+++ b/security/putty/patches/patch-timing.c
@@ -0,0 +1,28 @@
+$NetBSD: patch-timing.c,v 1.1 2012/11/01 19:32:44 joerg Exp $
+
+--- timing.c.orig 2012-10-30 22:23:57.000000000 +0000
++++ timing.c
+@@ -41,21 +41,10 @@ static int compare_timers(void *av, void
+ * Failing that, compare on the other two fields, just so that
+ * we don't get unwanted equality.
+ */
+-#ifdef __LCC__
+- /* lcc won't let us compare function pointers. Legal, but annoying. */
+- {
+- int c = memcmp(&a->fn, &b->fn, sizeof(a->fn));
+- if (c < 0)
+- return -1;
+- else if (c > 0)
+- return +1;
+- }
+-#else
+- if (a->fn < b->fn)
++ if ((uintptr_t)a->fn < (uintptr_t)b->fn)
+ return -1;
+- else if (a->fn > b->fn)
++ else if ((uintptr_t)a->fn > (uintptr_t)b->fn)
+ return +1;
+-#endif
+
+ if (a->ctx < b->ctx)
+ return -1;
diff --git a/security/putty/patches/patch-unix_gtkwin.c b/security/putty/patches/patch-unix_gtkwin.c
index 544410063e3..5c5e7e080e4 100644
--- a/security/putty/patches/patch-unix_gtkwin.c
+++ b/security/putty/patches/patch-unix_gtkwin.c
@@ -1,4 +1,4 @@
-$NetBSD: patch-unix_gtkwin.c,v 1.1 2012/02/22 15:27:17 wiz Exp $
+$NetBSD: patch-unix_gtkwin.c,v 1.2 2012/11/01 19:32:44 joerg Exp $
Make the home/end keys work on BSD servers as well as Linux ones
@@ -21,7 +21,7 @@ Make the home/end keys work on BSD servers as well as Linux ones
+ he = code == 1 ? "\x1B[7~" : "\x1B[8~";
+ else
+ he = code == 1 ? "\x1BOH" : "\x1BOF";
-+ end = 1 + sprintf(output+1, he);
++ end = 1 + sprintf(output+1, "%s", he);
goto done;
}
if (code) {
diff --git a/security/putty/patches/patch-unix_uxucs.c b/security/putty/patches/patch-unix_uxucs.c
new file mode 100644
index 00000000000..bfdc3d92258
--- /dev/null
+++ b/security/putty/patches/patch-unix_uxucs.c
@@ -0,0 +1,13 @@
+$NetBSD: patch-unix_uxucs.c,v 1.1 2012/11/01 19:32:44 joerg Exp $
+
+--- unix/uxucs.c.orig 2012-10-30 22:26:02.000000000 +0000
++++ unix/uxucs.c
+@@ -76,7 +76,7 @@ int wc_to_mb(int codepage, int flags, wc
+ setlocale(LC_CTYPE, "");
+
+ while (wclen > 0) {
+- int i = wcrtomb(output, wcstr[0], &state);
++ size_t i = wcrtomb(output, wcstr[0], &state);
+ if (i == (size_t)-1 || i > n - mblen)
+ break;
+ memcpy(mbstr+n, output, i);