diff options
Diffstat (limited to 'security/putty/patches')
-rw-r--r-- | security/putty/patches/patch-terminal.c | 4 | ||||
-rw-r--r-- | security/putty/patches/patch-timing.c | 28 | ||||
-rw-r--r-- | security/putty/patches/patch-unix_gtkwin.c | 4 | ||||
-rw-r--r-- | security/putty/patches/patch-unix_uxucs.c | 13 |
4 files changed, 45 insertions, 4 deletions
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); |