pkgsrc-Bugs archive

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

Re: pkg/35092 (proftpd-1.3.0nb1 causes segfaults)



The following reply was made to PR pkg/35092; it has been noted by GNATS.

From: Adrian Portelli <adrianp%NetBSD.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: naoto%morishima.net@localhost
Subject: Re: pkg/35092 (proftpd-1.3.0nb1 causes segfaults)
Date: Wed, 22 Nov 2006 20:07:53 +0000

 This is a multi-part message in MIME format.
 --------------000607070206020203070607
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: 7bit
 
 Hi,
 
 Could you please try the attached patch and let me know how you get on.
 
 thanks,
 
 adrian.
 
 
 --------------000607070206020203070607
 Content-Type: text/plain;
  name="proftpd.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="proftpd.diff"
 
 Index: Makefile
 ===================================================================
 RCS file: /cvsroot/pkgsrc/net/proftpd/Makefile,v
 retrieving revision 1.36
 diff -u -r1.36 Makefile
 --- Makefile   18 Nov 2006 14:32:58 -0000      1.36
 +++ Makefile   22 Nov 2006 20:04:03 -0000
 @@ -1,7 +1,7 @@
  # $NetBSD: Makefile,v 1.36 2006/11/18 14:32:58 adrianp Exp $
  
  DISTNAME=     proftpd-1.3.0
 -PKGREVISION=  1
 +PKGREVISION=  2
  CATEGORIES=   net
  MASTER_SITES= ftp://ftp.proftpd.org/distrib/source/ \
                ftp://ftp.servus.at/ProFTPD/distrib/source/ \
 Index: distinfo
 ===================================================================
 RCS file: /cvsroot/pkgsrc/net/proftpd/distinfo,v
 retrieving revision 1.19
 diff -u -r1.19 distinfo
 --- distinfo   18 Nov 2006 14:32:58 -0000      1.19
 +++ distinfo   22 Nov 2006 20:04:03 -0000
 @@ -5,4 +5,4 @@
  Size (proftpd-1.3.0.tar.bz2) = 1386086 bytes
  SHA1 (patch-aa) = 5ebfe97a0edb8ecee7495fd5d487eff3cf32d1fe
  SHA1 (patch-ab) = 8886177b90089c8a2fa580aceb7a0514fe0ea6a7
 -SHA1 (patch-ac) = 25a0b27773e5e025096cf08ad33243aaf143fbb8
 +SHA1 (patch-ac) = 4cdfd0cff027524c38785a5a45bae747e3b151f7
 Index: patches/patch-ac
 ===================================================================
 RCS file: /cvsroot/pkgsrc/net/proftpd/patches/patch-ac,v
 retrieving revision 1.5
 diff -u -r1.5 patch-ac
 --- patches/patch-ac   18 Nov 2006 14:32:58 -0000      1.5
 +++ patches/patch-ac   22 Nov 2006 20:04:03 -0000
 @@ -1,47 +1,49 @@
 -$NetBSD: patch-ac,v 1.5 2006/11/18 14:32:58 adrianp Exp $
 +$NetBSD$
  
 ---- src/main.c.orig   2006-11-18 14:24:35.000000000 +0000
 +--- src/main.c.orig   2006-03-15 19:41:01.000000000 +0000
  +++ src/main.c
  @@ -116,6 +116,8 @@ static unsigned char have_dead_child = F
   
   static char sbuf[PR_TUNABLE_BUFFER_SIZE] = {'\0'};
   
 -+#define PR_DEFAULT_CMD_BUFSZ   512
 ++#define PR_DEFAULT_CMD_BUFSZ    512
  +
   static char **Argv = NULL;
   static char *LastArgv = NULL;
   static const char *PidPath = PR_PID_FILE_PATH;
 -@@ -820,16 +822,25 @@ static void cmd_loop(server_rec *server,
 +@@ -820,17 +822,24 @@ static void cmd_loop(server_rec *server,
         pr_timer_reset(TIMER_IDLE, NULL);
   
       if (cmd_buf_size == -1) {
  -      long *buf_size = get_param_ptr(main_server->conf,
  -        "CommandBufferSize", FALSE);
 -+      int *bufsz = get_param_ptr(main_server->conf, "CommandBufferSize",
 -+        FALSE);
 - 
 +-
  -      if (buf_size == NULL || *buf_size <= 0)
  -        cmd_buf_size = 512;
 -+      if (bufsz == NULL ||
 -+          *bufsz <= 0) {
 -+     pr_log_pri(PR_LOG_WARNING, "invalid CommandBufferSize size (%d) "
 -+          "given, resetting to default buffer size (%u)",
 -+          *bufsz, (unsigned int) PR_DEFAULT_CMD_BUFSZ);
 -+        cmd_buf_size = PR_DEFAULT_CMD_BUFSZ;
 -+
 -+      } else if (*bufsz + 1 > sizeof(buf)) {
 -+     pr_log_pri(PR_LOG_WARNING, "invalid CommandBufferSize size (%d) "
 -+          "given, resetting to default buffer size (%u)",
 -+          *bufsz, (unsigned int) PR_DEFAULT_CMD_BUFSZ);
 -+     cmd_buf_size = PR_DEFAULT_CMD_BUFSZ;
 - 
 +-
  -      else if (*buf_size + 1 > sizeof(buf)) {
  -     pr_log_pri(PR_LOG_WARNING, "Invalid CommandBufferSize size given. "
  -          "Resetting to 512.");
  -     cmd_buf_size = 512;
 -+      } else {
 -+        pr_log_debug(DEBUG1, "setting CommandBufferSize to %d", *bufsz);
 -+        cmd_buf_size = (long) *bufsz;
 -       }
 +-      }
 ++      int *bufsz = get_param_ptr(main_server->conf, "CommandBufferSize", 
FALSE);
 ++    if (bufsz == NULL) {
 ++      cmd_buf_size = PR_DEFAULT_CMD_BUFSZ;
 ++    }
 ++    else if ( bufsz <= 0 ) {
 ++      pr_log_pri(PR_LOG_WARNING, "invalid CommandBufferSize size (%d) "
 ++                 "given, resetting to default buffer size (%u)",
 ++              *bufsz, (unsigned int) PR_DEFAULT_CMD_BUFSZ);
 ++      cmd_buf_size = PR_DEFAULT_CMD_BUFSZ;
 ++    } else if (*bufsz + 1 > sizeof(buf)) {
 ++          pr_log_pri(PR_LOG_WARNING, "invalid CommandBufferSize size (%d) "
 ++                     "given, using default buffer size (%u) instead",
 ++                     *bufsz, (unsigned int) PR_DEFAULT_CMD_BUFSZ);
 ++          cmd_buf_size = PR_DEFAULT_CMD_BUFSZ;
 ++        } else {
 ++          pr_log_debug(DEBUG1, "setting CommandBufferSize to %d", *bufsz);
 ++          cmd_buf_size = (long) *bufsz;
 ++        }
       }
   
 +     buf[cmd_buf_size - 1] = '\0';
 
 --------------000607070206020203070607--
 



Home | Main Index | Thread Index | Old Index