pkgsrc-Changes archive

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

CVS commit: pkgsrc/chat/i2cbd



Module Name:    pkgsrc
Committed By:   spz
Date:           Mon Dec 11 07:54:43 UTC 2017

Modified Files:
        pkgsrc/chat/i2cbd: Makefile distinfo
        pkgsrc/chat/i2cbd/patches: patch-aa patch-ab patch-src_access.c
Added Files:
        pkgsrc/chat/i2cbd/patches: patch-src_Makefile patch-src_groups.c
            patch-src_ipcf.c patch-src_main.c patch-src_s__group.c
            patch-src_s__user.c patch-src_send.c patch-src_serverserve.c
            patch-src_signals.c patch-util_Makefile

Log Message:
RELRO and friends
fix the issues found by -Wall


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 pkgsrc/chat/i2cbd/Makefile
cvs rdiff -u -r1.17 -r1.18 pkgsrc/chat/i2cbd/distinfo
cvs rdiff -u -r1.2 -r1.3 pkgsrc/chat/i2cbd/patches/patch-aa \
    pkgsrc/chat/i2cbd/patches/patch-src_access.c
cvs rdiff -u -r1.4 -r1.5 pkgsrc/chat/i2cbd/patches/patch-ab
cvs rdiff -u -r0 -r1.1 pkgsrc/chat/i2cbd/patches/patch-src_Makefile \
    pkgsrc/chat/i2cbd/patches/patch-src_groups.c \
    pkgsrc/chat/i2cbd/patches/patch-src_ipcf.c \
    pkgsrc/chat/i2cbd/patches/patch-src_main.c \
    pkgsrc/chat/i2cbd/patches/patch-src_s__group.c \
    pkgsrc/chat/i2cbd/patches/patch-src_s__user.c \
    pkgsrc/chat/i2cbd/patches/patch-src_send.c \
    pkgsrc/chat/i2cbd/patches/patch-src_serverserve.c \
    pkgsrc/chat/i2cbd/patches/patch-src_signals.c \
    pkgsrc/chat/i2cbd/patches/patch-util_Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/chat/i2cbd/Makefile
diff -u pkgsrc/chat/i2cbd/Makefile:1.33 pkgsrc/chat/i2cbd/Makefile:1.34
--- pkgsrc/chat/i2cbd/Makefile:1.33     Thu Jan 19 18:52:03 2017
+++ pkgsrc/chat/i2cbd/Makefile  Mon Dec 11 07:54:42 2017
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.33 2017/01/19 18:52:03 agc Exp $
+# $NetBSD: Makefile,v 1.34 2017/12/11 07:54:42 spz Exp $
 #
 
 DISTNAME=      i2cbd-2.0_BETA5
-PKGREVISION=   3
+PKGREVISION=   4
 CATEGORIES=    chat
 MASTER_SITES=  ${MASTER_SITE_LOCAL}
 MASTER_SITES+= http://www.draga.com/~jwise/i2cb/

Index: pkgsrc/chat/i2cbd/distinfo
diff -u pkgsrc/chat/i2cbd/distinfo:1.17 pkgsrc/chat/i2cbd/distinfo:1.18
--- pkgsrc/chat/i2cbd/distinfo:1.17     Sun Nov 22 17:17:32 2015
+++ pkgsrc/chat/i2cbd/distinfo  Mon Dec 11 07:54:42 2017
@@ -1,11 +1,22 @@
-$NetBSD: distinfo,v 1.17 2015/11/22 17:17:32 dholland Exp $
+$NetBSD: distinfo,v 1.18 2017/12/11 07:54:42 spz Exp $
 
 SHA1 (i2cbd-2.0_BETA5.tar.gz) = be219c5b6fa2413681214d756dee02c3cd252843
 RMD160 (i2cbd-2.0_BETA5.tar.gz) = d48988fb175857370c2523c86e0e586decbe28ae
 SHA512 (i2cbd-2.0_BETA5.tar.gz) = 8e13e005c46dfbb8a63a1269872270db03a0f1378a0cb14a879a8572583e47893047ebabd2e7391964d94ab9e5a4c89d88a3a5c5727195904fd0f5173b8e51b3
 Size (i2cbd-2.0_BETA5.tar.gz) = 59158 bytes
-SHA1 (patch-aa) = 0151f8e68be11e759425d2e9569df3d465c50931
-SHA1 (patch-ab) = bca8ecb0f41be6405333f2bcf7722dc725ffc777
+SHA1 (patch-aa) = 0cf7ee306f19da66876ec8ebf2022468ded274a8
+SHA1 (patch-ab) = 77627f5771535862530f8a497a16e64bee19075f
 SHA1 (patch-ac) = ca8e6b7324a22fb9ecabf2374e34febb55196e28
-SHA1 (patch-src_access.c) = 4762a7a050c811bb64cae8b2aabff9116cd25601
+SHA1 (patch-src_Makefile) = c4fb1672fd18c4ff8701a16ed3a023032c6e1991
+SHA1 (patch-src_access.c) = 59ff909eade534eca94a40163066e6812f699f8e
+SHA1 (patch-src_groups.c) = 989cb50a2917a370eda6c8ce2e5085253e24a5d1
+SHA1 (patch-src_ipcf.c) = 757b62b454dac6eb5c3335d4167e753734f03256
+SHA1 (patch-src_main.c) = d28d6d265860c5a47614ef690bc81420230f8627
+SHA1 (patch-src_s__group.c) = b16c754174884ea31f46dade9e7456d8fbb670b0
 SHA1 (patch-src_s__info.c) = 5e13e0b8934f45beac84be459ca85d9d089a4d3f
+SHA1 (patch-src_s__user.c) = 8f6571192ca0cdcd6ac29498df2e0940b444d62b
+SHA1 (patch-src_send.c) = 8cc38335b56139220009dcfaf2dc567c1c86cffb
+SHA1 (patch-src_serverserve.c) = 3d68156b6b8c15debe8f13583ebaceedd648820e
+SHA1 (patch-src_signals.c) = 7aef0d213b9975bbe48bb523c6a1bc1b73289d6f
+SHA1 (patch-util_Makefile) = 18e8ae7816a2fac268966b4ac4aa3571022e5eb9
+SHA1 (patch-util_icbdb.c) = f249aa4f286fccaa292c30af290b2ad705972556

Index: pkgsrc/chat/i2cbd/patches/patch-aa
diff -u pkgsrc/chat/i2cbd/patches/patch-aa:1.2 pkgsrc/chat/i2cbd/patches/patch-aa:1.3
--- pkgsrc/chat/i2cbd/patches/patch-aa:1.2      Tue Jul 29 16:25:56 2003
+++ pkgsrc/chat/i2cbd/patches/patch-aa  Mon Dec 11 07:54:42 2017
@@ -1,4 +1,6 @@
-$NetBSD: patch-aa,v 1.2 2003/07/29 16:25:56 jmmv Exp $
+$NetBSD: patch-aa,v 1.3 2017/12/11 07:54:42 spz Exp $
+
+pkgsrcify
 
 --- config.h.orig      Tue Oct 30 20:37:28 2001
 +++ config.h
Index: pkgsrc/chat/i2cbd/patches/patch-src_access.c
diff -u pkgsrc/chat/i2cbd/patches/patch-src_access.c:1.2 pkgsrc/chat/i2cbd/patches/patch-src_access.c:1.3
--- pkgsrc/chat/i2cbd/patches/patch-src_access.c:1.2    Sun Nov 22 17:17:33 2015
+++ pkgsrc/chat/i2cbd/patches/patch-src_access.c        Mon Dec 11 07:54:42 2017
@@ -1,8 +1,10 @@
-$NetBSD: patch-src_access.c,v 1.2 2015/11/22 17:17:33 dholland Exp $
+$NetBSD: patch-src_access.c,v 1.3 2017/12/11 07:54:42 spz Exp $
 
 Fix bounding errors detected by OpenBSD's compiler.
 
---- src/access.c~      2006-05-11 03:44:52.000000000 +0000
+don't cut off realnames or passwords
+
+--- src/access.c.orig  2006-05-11 03:44:52.000000000 +0000
 +++ src/access.c
 @@ -341,7 +341,7 @@ nickreadmsg(int forWhom)
                                strncpy(from, data.data, data.size);
@@ -13,6 +15,24 @@ Fix bounding errors detected by OpenBSD'
                        userdb->del(userdb, &key, 0);
  
                        snprintf(kbuf, KEY_SIZE, "%s.message%d", u_tab[forWhom].nickname, i);
+@@ -461,7 +461,7 @@ nickchpass(int forWhom, const char *oldp
+               strncpy(line, data.data, data.size);
+               line[data.size] = '\0';
+ 
+-              if (strncmp(line, oldpw, MAX_PASSWDLEN)) {
++              if (strncmp(line, oldpw, MAX_PASSWDLEN+1)) {
+                       snprintf(line, LINE_SIZE, "Authorization failure");
+                       senderror(forWhom, line);
+               } else {
+@@ -522,7 +522,7 @@ nickwrite (int forWhom, const char *pass
+                       snprintf(line, LINE_SIZE, "Nick registered");
+                       sends_cmdout(forWhom, line);
+ 
+-                      strlcpy(u_tab[forWhom].realname, "registered", MAX_REALLEN);
++                      strlcpy(u_tab[forWhom].realname, "registered", MAX_REALLEN+1);
+                       strlcpy(u_tab[forWhom].password, password, MAX_PASSWDLEN+1);
+                       nickwritetime(forWhom, 0);
+ 
 @@ -581,7 +581,7 @@ nickwrite (int forWhom, const char *pass
                snprintf(line, LINE_SIZE, "Nick registered");
                sends_cmdout(forWhom, line);

Index: pkgsrc/chat/i2cbd/patches/patch-ab
diff -u pkgsrc/chat/i2cbd/patches/patch-ab:1.4 pkgsrc/chat/i2cbd/patches/patch-ab:1.5
--- pkgsrc/chat/i2cbd/patches/patch-ab:1.4      Fri Oct 24 21:12:18 2003
+++ pkgsrc/chat/i2cbd/patches/patch-ab  Mon Dec 11 07:54:42 2017
@@ -1,6 +1,9 @@
-$NetBSD: patch-ab,v 1.4 2003/10/24 21:12:18 jwise Exp $
---- config.mk.orig     Tue Oct 30 20:50:40 2001
-+++ config.mk  Sat Aug  2 22:28:11 2003
+$NetBSD: patch-ab,v 1.5 2017/12/11 07:54:42 spz Exp $
+
+pkgsrcify
+
+--- config.mk.orig     2003-10-24 20:47:04.000000000 +0000
++++ config.mk
 @@ -3,7 +3,6 @@
  #     For copying and distribution information, see the file COPYING.
  #
@@ -9,12 +12,14 @@ $NetBSD: patch-ab,v 1.4 2003/10/24 21:12
  BINDIR                = ${PREFIX}/sbin
  MANDIR                = ${PREFIX}/man
  MAN8DIR               = ${PREFIX}/man/man8
-@@ -19,7 +18,7 @@
+@@ -19,8 +18,8 @@ EXTRAWARNS   = -Wshadow -Wpointer-arith -W
  # affect portability to some platforms.  The others here are irrelevant.
  BADWARNS      = -Wwrite-strings -Wconversion -Waggregate-return -Wredundant-decls
  DEBUG         = -DDEBUG -DVERBOSE -g
 -CFLAGS                = ${WARNS} ${EXTRAWARNS} ${DEBUG}
-+CFLAGS                = ${WARNS} ${EXTRAWARNS} ${DEBUG} -DPREFIX=\"${PREFIX}\" -DPKG_SYSCONFDIR=\"${PKG_SYSCONFDIR}\"
- LDFLAGS               =
+-LDFLAGS               =
++CFLAGS                += ${WARNS} ${EXTRAWARNS} ${DEBUG} -DPREFIX=\"${PREFIX}\" -DPKG_SYSCONFDIR=\"${PKG_SYSCONFDIR}\"
++#LDFLAGS              =
  LIBS          = -lutil
  
+ LINT          = lint

Added files:

Index: pkgsrc/chat/i2cbd/patches/patch-src_Makefile
diff -u /dev/null pkgsrc/chat/i2cbd/patches/patch-src_Makefile:1.1
--- /dev/null   Mon Dec 11 07:54:43 2017
+++ pkgsrc/chat/i2cbd/patches/patch-src_Makefile        Mon Dec 11 07:54:42 2017
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_Makefile,v 1.1 2017/12/11 07:54:42 spz Exp $
+
+RELRO package
+
+--- src/Makefile.orig  2006-05-11 03:44:52.000000000 +0000
++++ src/Makefile
+@@ -91,7 +91,7 @@ all: icbd
+ icbd: $(OBJ)
+ 
+ icbd: $(OBJ)
+-      $(CC) $(LDFLAGS) -o icbd $(OBJ) $(LIBS) $(OTHERLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o icbd $(OBJ) $(LIBS) $(OTHERLIBS)
+ 
+ install: all
+       ${INSTALL} -c -s -m 0755 icbd $(BINDIR)/icbd
Index: pkgsrc/chat/i2cbd/patches/patch-src_groups.c
diff -u /dev/null pkgsrc/chat/i2cbd/patches/patch-src_groups.c:1.1
--- /dev/null   Mon Dec 11 07:54:43 2017
+++ pkgsrc/chat/i2cbd/patches/patch-src_groups.c        Mon Dec 11 07:54:42 2017
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_groups.c,v 1.1 2017/12/11 07:54:42 spz Exp $
+
+fix copy length
+
+--- src/groups.c.orig  2006-05-11 03:44:52.000000000 +0000
++++ src/groups.c
+@@ -168,8 +168,8 @@ check_mods(int u_index)
+ void
+ fill_group_entry(int n, char *name, char *topic, int visibility, int control, int mod, int volume)
+ {
+-        strlcpy(g_tab[n].name, name, MAX_GROUPLEN);
+-        strlcpy(g_tab[n].topic, topic, MAX_TOPICLEN);
++        strlcpy(g_tab[n].name, name, MAX_GROUPLEN+1);
++        strlcpy(g_tab[n].topic, topic, MAX_TOPICLEN+1);
+ 
+         g_tab[n].visibility = visibility;
+         g_tab[n].control = control;
Index: pkgsrc/chat/i2cbd/patches/patch-src_ipcf.c
diff -u /dev/null pkgsrc/chat/i2cbd/patches/patch-src_ipcf.c:1.1
--- /dev/null   Mon Dec 11 07:54:43 2017
+++ pkgsrc/chat/i2cbd/patches/patch-src_ipcf.c  Mon Dec 11 07:54:42 2017
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_ipcf.c,v 1.1 2017/12/11 07:54:42 spz Exp $
+
+fix copy length
+
+--- src/ipcf.c.orig    2006-05-11 03:44:52.000000000 +0000
++++ src/ipcf.c
+@@ -217,7 +217,7 @@ s_lost_user(int n)
+                  snprintf(line, LINE_SIZE, "Your group moderator signed off. (%d second timeout)", (int) MOD_TIMEOUT);
+                  s_status_group(2,0,was_mod, "Mod", line);
+                  g_tab[was_mod].mod = -1;
+-                 strlcpy(g_tab[was_mod].missingmod, t_name, MAX_NICKLEN);
++                 strlcpy(g_tab[was_mod].missingmod, t_name, MAX_NICKLEN+1);
+                  TheTime = time(NULL);
+                  g_tab[was_mod].modtimeout = TheTime + MOD_TIMEOUT;
+                  }
Index: pkgsrc/chat/i2cbd/patches/patch-src_main.c
diff -u /dev/null pkgsrc/chat/i2cbd/patches/patch-src_main.c:1.1
--- /dev/null   Mon Dec 11 07:54:43 2017
+++ pkgsrc/chat/i2cbd/patches/patch-src_main.c  Mon Dec 11 07:54:42 2017
@@ -0,0 +1,25 @@
+$NetBSD: patch-src_main.c,v 1.1 2017/12/11 07:54:42 spz Exp $
+
+fix daemon call
+fix copy length
+
+--- src/main.c.orig    2006-05-11 03:44:52.000000000 +0000
++++ src/main.c
+@@ -113,7 +113,7 @@ main (int argc, char **argv)
+               }
+ 
+               if (noforkflag == 0)
+-                      daemon(0,0);
++                      daemon(1,0);
+ 
+               pidfile("icbd");
+ 
+@@ -132,7 +132,7 @@ main (int argc, char **argv)
+               u_tab[NICKSERV].login = 1;
+               u_tab[NICKSERV].t_on = TheTime;
+               u_tab[NICKSERV].t_recv = TheTime;
+-              strlcpy(u_tab[NICKSERV].realname, "registered", MAX_NICKLEN);
++              strlcpy(u_tab[NICKSERV].realname, "registered", MAX_NICKLEN+1);
+               fill_group_entry(0, "ICB", "...here to serve you!", SUPERSECRET, RESTRICTED, NICKSERV, QUIET);
+               nickwritetime(NICKSERV, 0);
+ 
Index: pkgsrc/chat/i2cbd/patches/patch-src_s__group.c
diff -u /dev/null pkgsrc/chat/i2cbd/patches/patch-src_s__group.c:1.1
--- /dev/null   Mon Dec 11 07:54:43 2017
+++ pkgsrc/chat/i2cbd/patches/patch-src_s__group.c      Mon Dec 11 07:54:42 2017
@@ -0,0 +1,48 @@
+$NetBSD: patch-src_s__group.c,v 1.1 2017/12/11 07:54:42 spz Exp $
+
+fix copy lengths
+
+--- src/s_group.c.orig 2006-05-11 03:44:53.000000000 +0000
++++ src/s_group.c
+@@ -260,7 +260,7 @@ s_change(int n, int argc)
+                       }
+                       /* could create it, so fill in the info */
+                       g_tab[ngi].visibility = visibility;
+-                      strlcpy(g_tab[ngi].name, n_g_n, MAX_GROUPLEN);
++                      strlcpy(g_tab[ngi].name, n_g_n, MAX_GROUPLEN+1);
+                       if (strcasecmp("1", n_g_n) != 0) {
+                               g_tab[ngi].control = MODERATED;
+                               g_tab[ngi].mod = n;
+@@ -326,7 +326,7 @@ s_change(int n, int argc)
+               /* is the new group different than the old group? */
+               if (ngi != ogi) {
+                       /* the group exists and we are allowed in. */
+-                      strlcpy(u_tab[n].group, g_tab[ngi].name, MAX_GROUPLEN);
++                      strlcpy(u_tab[n].group, g_tab[ngi].name, MAX_GROUPLEN+1);
+ 
+                       /* tell the new group about the arrival */
+                       snprintf(line, LINE_SIZE, "%s (%s@%s) entered group", u_tab[n].nickname,
+@@ -1056,7 +1056,7 @@ s_topic(int n, int argc)
+                               return;
+                       }
+ 
+-                      strlcpy(g_tab[t_group].topic,fields[1],MAX_TOPICLEN);
++                      strlcpy(g_tab[t_group].topic,fields[1],MAX_TOPICLEN+1);
+                       if (g_tab[t_group].volume != QUIET) {
+                         snprintf(line, LINE_SIZE, "%s changed the topic to \"%s\"",
+                               u_tab[n].nickname,
+@@ -1210,12 +1210,12 @@ set_name(int n, int group, char *name)
+       /* and change their group name entries */
+       for (i=0; i< MAX_REAL_USERS; i++) {
+               if (strcasecmp(u_tab[i].group, cp) == 0) {
+-                      strlcpy(u_tab[i].group, n_g_n, MAX_GROUPLEN);
++                      strlcpy(u_tab[i].group, n_g_n, MAX_GROUPLEN+1);
+               }
+       }
+ 
+       /* finally change the name of the group itself */
+-      strlcpy(g_tab[group].name, n_g_n, MAX_GROUPLEN);
++      strlcpy(g_tab[group].name, n_g_n, MAX_GROUPLEN+1);
+       return 0;
+ }
+ 
Index: pkgsrc/chat/i2cbd/patches/patch-src_s__user.c
diff -u /dev/null pkgsrc/chat/i2cbd/patches/patch-src_s__user.c:1.1
--- /dev/null   Mon Dec 11 07:54:43 2017
+++ pkgsrc/chat/i2cbd/patches/patch-src_s__user.c       Mon Dec 11 07:54:42 2017
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_s__user.c,v 1.1 2017/12/11 07:54:42 spz Exp $
+
+fix copy length
+
+--- src/s_user.c.orig  2006-05-11 03:44:53.000000000 +0000
++++ src/s_user.c
+@@ -277,7 +277,7 @@ s_name(int n, int argc)
+               snprintf(line, LINE_SIZE, "%s changed nickname to %s", u_tab[n].nickname, new_name);
+                 s_status_group(1,0,n,"Name",line);
+               nickwritetime(n, 1);
+-              strlcpy(u_tab[n].nickname, new_name, MAX_NICKLEN);
++              strlcpy(u_tab[n].nickname, new_name, MAX_NICKLEN+1);
+ 
+               /* side-effects:
+                       inform folx in same group of change
+@@ -290,7 +290,7 @@ s_name(int n, int argc)
+               ret = nicklookup(-n, u_tab[n].nickname);
+               if (ret == 0) {
+                       /* we know this person */
+-                      strlcpy(u_tab[n].realname, "registered", MAX_REALLEN);
++                      strlcpy(u_tab[n].realname, "registered", MAX_REALLEN+1);
+                       sends_cmdout(n, "Nick registered");
+                       nickwritetime(n, 0);
+                       for (i = 1; i < MAX_GROUPS; i++)
Index: pkgsrc/chat/i2cbd/patches/patch-src_send.c
diff -u /dev/null pkgsrc/chat/i2cbd/patches/patch-src_send.c:1.1
--- /dev/null   Mon Dec 11 07:54:43 2017
+++ pkgsrc/chat/i2cbd/patches/patch-src_send.c  Mon Dec 11 07:54:42 2017
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_send.c,v 1.1 2017/12/11 07:54:42 spz Exp $
+
+fix copy length
+
+--- src/send.c.orig    2006-05-11 03:44:53.000000000 +0000
++++ src/send.c
+@@ -163,7 +163,7 @@ s_new_user(int n)
+               return;
+               }
+       snprintf(line, LINE_SIZE, "[CONNECT] %d: %s", n, cp);
+-      strlcpy(u_tab[n].nodeid, cp, MAX_NODELEN);
++      strlcpy(u_tab[n].nodeid, cp, MAX_NODELEN+1);
+       MDB(line);
+ }
+ 
Index: pkgsrc/chat/i2cbd/patches/patch-src_serverserve.c
diff -u /dev/null pkgsrc/chat/i2cbd/patches/patch-src_serverserve.c:1.1
--- /dev/null   Mon Dec 11 07:54:43 2017
+++ pkgsrc/chat/i2cbd/patches/patch-src_serverserve.c   Mon Dec 11 07:54:42 2017
@@ -0,0 +1,37 @@
+$NetBSD: patch-src_serverserve.c,v 1.1 2017/12/11 07:54:42 spz Exp $
+
+when checking FD_ISSET also check for <0
+start fd checks at 0
+
+--- src/serverserve.c.orig     2006-05-11 03:50:28.000000000 +0000
++++ src/serverserve.c  2008-03-21 16:22:20.000000000 +0000
+@@ -80,7 +80,7 @@
+                   for (i = 0; i < MAX_USERS+1; i++)
+                   {
+                       /* if it's currently being held */
+-                      if (FD_ISSET(i, &held_fdset) > 0)
++                      if (FD_ISSET(i, &held_fdset))
+                       {
+                           /* add it to fdset and remove it from held */
+                           FD_SET (i, &fdset);
+@@ -106,16 +106,16 @@
+ {
+       int n, x, fcarg;
+ 
+-      for (x = 1; x <= highestfd; x++)
+-              if (FD_ISSET(x, &efdr) > 0) {
++      for (x = 0; x <= highestfd; x++)
++              if (FD_ISSET(x, &efdr)) {
+                       disconnectuser(x);
+                       }
+ 
+       /* examine set of file descriptors */
+-      for (x = 1; x <= highestfd; x++) {
++      for (x = 0; x <= highestfd; x++) {
+               int closed = 0;
+ 
+-              if (FD_ISSET(x, &fdr) > 0) {
++              if (FD_ISSET(x, &fdr)) {
+                       if (FD_ISSET(x,&serversocks)) {
+                               /* new connect on advertised socket */
+                               if ((n = newconnect(x)) > 0)
Index: pkgsrc/chat/i2cbd/patches/patch-src_signals.c
diff -u /dev/null pkgsrc/chat/i2cbd/patches/patch-src_signals.c:1.1
--- /dev/null   Mon Dec 11 07:54:43 2017
+++ pkgsrc/chat/i2cbd/patches/patch-src_signals.c       Mon Dec 11 07:54:42 2017
@@ -0,0 +1,47 @@
+$NetBSD: patch-src_signals.c,v 1.1 2017/12/11 07:54:42 spz Exp $
+
+remember bricks
+fix array overrun
+
+--- src/signals.c.orig 2006-05-11 03:44:53.000000000 +0000
++++ src/signals.c
+@@ -54,7 +54,7 @@ icbdump (int sig)
+ 
+     fprintf (dump, "%d\n", highestfd);
+ 
+-    for (i = 0; i <= MAX_REAL_USERS; i++)
++    for (i = 0; i < MAX_REAL_USERS; i++)
+       fprintf (dump, "%d\n", S_kill[i]);
+ 
+     for (i = 0; i < MAX_USERS; i++)
+@@ -168,6 +168,9 @@ icbdump (int sig)
+                       fprintf(dump, "%sX\n", nlget(g_tab[i].nr_talk));
+     }
+ 
++    for (i = 0; i < MAX_REAL_USERS; i++)
++      fprintf (dump, "%d\n", S_bricks[i]);
++
+     fclose(dump);
+ }
+ 
+@@ -198,7 +201,7 @@ icbload (int sig)
+     }
+ 
+     fscanf (dump, "%d\n", &highestfd);
+-    for (i = 0; i <= MAX_REAL_USERS; i++) {
++    for (i = 0; i < MAX_REAL_USERS; i++) {
+       fscanf (dump, "%ld\n", &k);
+       S_kill[i] = (int)k;
+     }
+@@ -368,5 +371,11 @@ icbload (int sig)
+       }
+     }
+ 
++    for (i = 0; i < MAX_REAL_USERS; i++) {
++      fscanf (dump, "%ld\n", &k);
++      S_bricks[i] = (int)k;
++    }
++
++
+     fclose(dump);
+ }
Index: pkgsrc/chat/i2cbd/patches/patch-util_Makefile
diff -u /dev/null pkgsrc/chat/i2cbd/patches/patch-util_Makefile:1.1
--- /dev/null   Mon Dec 11 07:54:43 2017
+++ pkgsrc/chat/i2cbd/patches/patch-util_Makefile       Mon Dec 11 07:54:42 2017
@@ -0,0 +1,15 @@
+$NetBSD: patch-util_Makefile,v 1.1 2017/12/11 07:54:42 spz Exp $
+
+RELRO package
+
+--- util/Makefile.orig 2001-10-30 19:14:59.000000000 +0000
++++ util/Makefile
+@@ -10,7 +10,7 @@ SRCS=                icbdb.c
+ all: icbdb
+ 
+ icbdb: icbdb.c ../src/userdb.c
+-      $(CC) $(CFLAGS) -o icbdb icbdb.c ../src/userdb.c $(LIBS) $(OTHERLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o icbdb icbdb.c ../src/userdb.c $(LIBS) $(OTHERLIBS)
+ 
+ install: all
+       ${INSTALL} -c -s -m 0755 icbdb $(BINDIR)/icbdb



Home | Main Index | Thread Index | Old Index