pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/pkg_select fix crashes due to SSP being enabled



details:   https://anonhg.NetBSD.org/pkgsrc/rev/24d2ff318419
branches:  trunk
changeset: 373084:24d2ff318419
user:      plunky <plunky%pkgsrc.org@localhost>
date:      Fri Dec 29 11:59:13 2017 +0000

description:
fix crashes due to SSP being enabled

diffstat:

 pkgtools/pkg_select/Makefile                        |   6 ++--
 pkgtools/pkg_select/distinfo                        |  15 ++++++----
 pkgtools/pkg_select/patches/patch-curses__helpers.c |  28 +++++++++++++++++---
 pkgtools/pkg_select/patches/patch-extern.h          |   4 +-
 pkgtools/pkg_select/patches/patch-install__many.c   |   4 +-
 pkgtools/pkg_select/patches/patch-listmgt.c         |   4 +-
 pkgtools/pkg_select/patches/patch-live.c            |  15 +++++++++++
 pkgtools/pkg_select/patches/patch-more.c            |  23 +++++++++++++++++
 pkgtools/pkg_select/patches/patch-pkg__info.c       |  15 +++++++++++
 pkgtools/pkg_select/patches/patch-pkgsrc.c          |   4 +-
 10 files changed, 96 insertions(+), 22 deletions(-)

diffs (221 lines):

diff -r 655eaef530e1 -r 24d2ff318419 pkgtools/pkg_select/Makefile
--- a/pkgtools/pkg_select/Makefile      Fri Dec 29 06:59:54 2017 +0000
+++ b/pkgtools/pkg_select/Makefile      Fri Dec 29 11:59:13 2017 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.24 2017/01/03 18:45:15 roy Exp $
+# $NetBSD: Makefile,v 1.25 2017/12/29 11:59:13 plunky Exp $
 #
 
 DISTNAME=      pkg_select-20090308
-PKGREVISION=   6
+PKGREVISION=   7
 CATEGORIES=    pkgtools
 MASTER_SITES=  ftp://ftp.NetBSD.org/pub/NetBSD/misc/imil/
 
@@ -10,7 +10,7 @@
 COMMENT=       Curses based pkgsrc system browser / manager
 LICENSE=       original-bsd
 
-USE_FEATURES+=         cdefs
+USE_FEATURES=          cdefs
 
 INSTALLATION_DIRS=     bin ${PKGMANDIR}/man1
 INSTALLATION_DIRS+=    ${EXAMPLEDIR} share/pkg_select
diff -r 655eaef530e1 -r 24d2ff318419 pkgtools/pkg_select/distinfo
--- a/pkgtools/pkg_select/distinfo      Fri Dec 29 06:59:54 2017 +0000
+++ b/pkgtools/pkg_select/distinfo      Fri Dec 29 11:59:13 2017 +0000
@@ -1,11 +1,14 @@
-$NetBSD: distinfo,v 1.10 2015/11/04 00:38:40 agc Exp $
+$NetBSD: distinfo,v 1.11 2017/12/29 11:59:13 plunky Exp $
 
 SHA1 (pkg_select-20090308.tar.gz) = f4a4f40927631d16ee563671ce98e69843382c93
 RMD160 (pkg_select-20090308.tar.gz) = d265f8e18ee4500e2ac34ba2d105acff28cc7e91
 SHA512 (pkg_select-20090308.tar.gz) = 77ebda4cb6032d980682b7c4c9745982cd49d1683476fa8e16e345385651150576b252c0a4c1a6318e263c11ebc13bffa04393687db914011dfafe52d651125c
 Size (pkg_select-20090308.tar.gz) = 54637 bytes
-SHA1 (patch-curses__helpers.c) = 3100f625773543e4e93f8fb25d706d95aac3016b
-SHA1 (patch-extern.h) = 541e1234e88c926d1bdf94334862f0f0bc81bb59
-SHA1 (patch-install__many.c) = 44d9dc440500f9b30b777e109a360bcaafc5f1db
-SHA1 (patch-listmgt.c) = b1b2f5898709d52c72c465899f0e8dbf1e27a5c2
-SHA1 (patch-pkgsrc.c) = 655931c4a61657d951cab795b8e878b41a056f7c
+SHA1 (patch-curses__helpers.c) = fa30914f4a9b147c433fcb32249d2b773a5e2604
+SHA1 (patch-extern.h) = e1248f7180a76ec8f623719037cf5306b8de573b
+SHA1 (patch-install__many.c) = 24a39faaab697a84103311f0fc28c2670e201bbe
+SHA1 (patch-listmgt.c) = d27477fd0ce46a9c8ad6a86818dd9f018557459a
+SHA1 (patch-live.c) = b821986e8da22cd53b6c95975cd36abafbeda453
+SHA1 (patch-more.c) = 0a8c4440a085edfae7f8f4832cdbb7878e3bf85b
+SHA1 (patch-pkg__info.c) = d6c1f93461c91cfe44a9659d7197406c9c47d890
+SHA1 (patch-pkgsrc.c) = df0b6c9633e75bc784ec34e88ec4201426d66464
diff -r 655eaef530e1 -r 24d2ff318419 pkgtools/pkg_select/patches/patch-curses__helpers.c
--- a/pkgtools/pkg_select/patches/patch-curses__helpers.c       Fri Dec 29 06:59:54 2017 +0000
+++ b/pkgtools/pkg_select/patches/patch-curses__helpers.c       Fri Dec 29 11:59:13 2017 +0000
@@ -1,10 +1,28 @@
-$NetBSD: patch-curses__helpers.c,v 1.2 2013/11/29 23:13:56 dholland Exp $
+$NetBSD: patch-curses__helpers.c,v 1.3 2017/12/29 11:59:13 plunky Exp $
 
+fix -Wset-but-unused
 Fix printf format strings.
 
---- curses_helpers.c.orig      2013-09-10 11:42:25.000000000 +0000
+--- curses_helpers.c.orig      2009-03-08 14:25:53.000000000 +0000
 +++ curses_helpers.c
-@@ -458,7 +458,7 @@ combo_entry(WINDOW *list_win, Etree *ite
+@@ -393,7 +393,7 @@ static int
+ combo_entry(WINDOW *list_win, Etree *item, HL_datas *hl, 
+           int d_index, int y, const char *path) {
+ 
+-      int i, real_hl;
++      int i;
+       int sb_real, sb_y;
+       int entry_size, comment_size;
+       static int last_sb = -1;
+@@ -416,7 +416,6 @@ combo_entry(WINDOW *list_win, Etree *ite
+       }
+       
+       /* highlight*/
+-      real_hl = hl->hl_index + hl->top_line;
+       /* delta between hl and old */
+       delta = hl->old_index - hl->hl_index;
+       
+@@ -458,7 +457,7 @@ combo_entry(WINDOW *list_win, Etree *ite
                snprintf(buf, MAXLEN, "[ %-15s%c%c]", tmp_entry, tbi, status);
                entry_size = strlen(buf);
                wattron(list_win, A_BOLD);
@@ -13,7 +31,7 @@
                wattroff(list_win, A_BOLD);
        }
        /* then comment | item list */
-@@ -653,11 +653,11 @@ progress_bar(const char **keylist, char 
+@@ -653,11 +652,11 @@ progress_bar(const char **keylist, char 
        for (i = 0; i < pg; i++) {
                /* clear line */
                line_padding(buf, ' ', w);
@@ -27,7 +45,7 @@
                wattron(popup, A_REVERSE);
                mvwprintw(popup, 3, i + 2, " ");
                wattroff(popup, A_REVERSE);
-@@ -698,7 +698,7 @@ cmd_spawn(int waitkey, const char **prog
+@@ -698,7 +697,7 @@ cmd_spawn(int waitkey, const char **prog
        while (fgets(buf, MAXLEN, fp) != NULL) {
                /* shell output preferred instead of progress bars */
                if (conf.shell_output)
diff -r 655eaef530e1 -r 24d2ff318419 pkgtools/pkg_select/patches/patch-extern.h
--- a/pkgtools/pkg_select/patches/patch-extern.h        Fri Dec 29 06:59:54 2017 +0000
+++ b/pkgtools/pkg_select/patches/patch-extern.h        Fri Dec 29 11:59:13 2017 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-extern.h,v 1.1 2013/11/29 23:13:56 dholland Exp $
+$NetBSD: patch-extern.h,v 1.2 2017/12/29 11:59:13 plunky Exp $
 
 Fix const correctness.
 
---- extern.h~  2009-03-08 14:25:53.000000000 +0000
+--- extern.h.orig      2009-03-08 14:25:53.000000000 +0000
 +++ extern.h
 @@ -50,7 +50,7 @@ extern int entry_search(Etree **, int);
  /* list mgt */
diff -r 655eaef530e1 -r 24d2ff318419 pkgtools/pkg_select/patches/patch-install__many.c
--- a/pkgtools/pkg_select/patches/patch-install__many.c Fri Dec 29 06:59:54 2017 +0000
+++ b/pkgtools/pkg_select/patches/patch-install__many.c Fri Dec 29 11:59:13 2017 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-install__many.c,v 1.1 2013/11/29 23:13:56 dholland Exp $
+$NetBSD: patch-install__many.c,v 1.2 2017/12/29 11:59:13 plunky Exp $
 
 Fix const correctness.
 
---- install_many.c~    2009-03-08 14:25:53.000000000 +0000
+--- install_many.c.orig        2009-03-08 14:25:53.000000000 +0000
 +++ install_many.c
 @@ -199,7 +199,7 @@ process_many(int action)
                if ((list = build_list_from_slist()) == NULL)
diff -r 655eaef530e1 -r 24d2ff318419 pkgtools/pkg_select/patches/patch-listmgt.c
--- a/pkgtools/pkg_select/patches/patch-listmgt.c       Fri Dec 29 06:59:54 2017 +0000
+++ b/pkgtools/pkg_select/patches/patch-listmgt.c       Fri Dec 29 11:59:13 2017 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-listmgt.c,v 1.1 2013/11/29 23:13:56 dholland Exp $
+$NetBSD: patch-listmgt.c,v 1.2 2017/12/29 11:59:13 plunky Exp $
 
 Fix const correctness.
 
---- listmgt.c~ 2009-03-08 14:25:53.000000000 +0000
+--- listmgt.c.orig     2009-03-08 14:25:53.000000000 +0000
 +++ listmgt.c
 @@ -90,7 +90,7 @@ entry_search(Etree **etree, int cont)
  }
diff -r 655eaef530e1 -r 24d2ff318419 pkgtools/pkg_select/patches/patch-live.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/pkg_select/patches/patch-live.c  Fri Dec 29 11:59:13 2017 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-live.c,v 1.1 2017/12/29 11:59:13 plunky Exp $
+
+fix buffer overrun
+
+--- live.c.orig        2009-03-08 14:25:53.000000000 +0000
++++ live.c
+@@ -199,7 +199,7 @@ ftp_get(const char *path, const char *fi
+ 
+       XMALLOC(tmppath, MIDLEN * sizeof(char));
+ 
+-      snprintf(tmppath, MAXLEN, "%s/%s.pkg_select", TMPDIR, file);
++      snprintf(tmppath, MIDLEN, "%s/%s.pkg_select", TMPDIR, file);
+ 
+       snprintf(cmd, MAXLEN, "cd %s\n", path);
+       if ((rc = ftp_cmd(cmd, "\n(550|250).*\n")) != 250)
diff -r 655eaef530e1 -r 24d2ff318419 pkgtools/pkg_select/patches/patch-more.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/pkg_select/patches/patch-more.c  Fri Dec 29 11:59:13 2017 +0000
@@ -0,0 +1,23 @@
+$NetBSD: patch-more.c,v 1.1 2017/12/29 11:59:13 plunky Exp $
+
+-Wset-but-unused
+
+--- more.c.orig        2014-12-30 15:00:06.000000000 +0000
++++ more.c
+@@ -37,7 +37,7 @@
+ static void
+ print_page(WINDOW *win, char **page, int maxlines, int maxcols, int y, int x)
+ {
+-      int i, j, len;
++      int i, j;
+       char buf[MAXLEN], *c;
+       
+       for (i = 0; (page[i] != NULL) && (i < maxlines); i++) {
+@@ -49,7 +49,6 @@ print_page(WINDOW *win, char **page, int
+               wprintw(win, "%s", buf);
+ 
+               /* print entry */
+-              len = strlen(page[i]);
+               snprintf(buf, MAXLEN, "%s", page[i]);
+ 
+               /* 5 = 2 borders + 2 lines + 1 */
diff -r 655eaef530e1 -r 24d2ff318419 pkgtools/pkg_select/patches/patch-pkg__info.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/pkg_select/patches/patch-pkg__info.c     Fri Dec 29 11:59:13 2017 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-pkg__info.c,v 1.1 2017/12/29 11:59:13 plunky Exp $
+
+fix buffer overrun
+
+--- pkg_info.c.orig    2017-12-29 11:44:43.485014784 +0000
++++ pkg_info.c
+@@ -122,7 +122,7 @@ syspkg_deinstall(WINDOW *win, const char
+ 
+       if ((tarlist = exec_list(buf, NULL)) != NULL) {
+               for (i = 0; tarlist[i] != NULL; i++) {
+-                      snprintf(buf, MAXLEN, "%s -f %s 2> /dev/null",
++                      snprintf(buf, MIDLEN, "%s -f %s 2> /dev/null",
+                                RM, tarlist[i]);
+                       rmcmd = exec_list(buf, NULL);
+                       /* unused output */
diff -r 655eaef530e1 -r 24d2ff318419 pkgtools/pkg_select/patches/patch-pkgsrc.c
--- a/pkgtools/pkg_select/patches/patch-pkgsrc.c        Fri Dec 29 06:59:54 2017 +0000
+++ b/pkgtools/pkg_select/patches/patch-pkgsrc.c        Fri Dec 29 11:59:13 2017 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-pkgsrc.c,v 1.1 2013/11/29 23:13:56 dholland Exp $
+$NetBSD: patch-pkgsrc.c,v 1.2 2017/12/29 11:59:13 plunky Exp $
 
 Fix const correctness.
 
---- pkgsrc.c~  2009-03-08 14:25:53.000000000 +0000
+--- pkgsrc.c.orig      2009-03-08 14:25:53.000000000 +0000
 +++ pkgsrc.c
 @@ -80,7 +80,7 @@ list_mirrors(const char *method)
  



Home | Main Index | Thread Index | Old Index