OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Michael van Elst
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   14-Mar-2003 10:55:37
  Branch: OPENPKG_1_STABLE                 Handle: 2003031409553600

  Modified files:           (Branch: OPENPKG_1_STABLE)
    openpkg-src/qpopper     qpopper.patch qpopper.spec

  Log:
    SA-2003.018

  Summary:
    Revision    Changes     Path
    1.1.4.1     +148 -0     openpkg-src/qpopper/qpopper.patch
    1.36.2.2    +1  -1      openpkg-src/qpopper/qpopper.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/qpopper/qpopper.patch
  ============================================================================
  $ cvs diff -u -r1.1 -r1.1.4.1 qpopper.patch
  --- openpkg-src/qpopper/qpopper.patch 28 Dec 2001 11:30:48 -0000      1.1
  +++ openpkg-src/qpopper/qpopper.patch 14 Mar 2003 09:55:36 -0000      1.1.4.1
  @@ -23,3 +23,151 @@
        /*
         * Set up the socket on which we listen
         */
  +--- common/snprintf.c-orig   Thu Mar 13 17:43:37 2003
  ++++ common/snprintf.c        Thu Mar 13 21:10:59 2003
  +@@ -1,5 +1,5 @@
  + /*
  +- * Copyright (c) 2002 QUALCOMM Incorporated. All rights reserved.
  ++ * Copyright (c) 2003 QUALCOMM Incorporated. All rights reserved.
  +  * See License.txt file for terms and conditions for modification and
  +  * redistribution.
  +  *
  +@@ -7,6 +7,10 @@
  +  *
  +  * Revisions: 
  +  *
  ++ *  03/11/03  [rcg]
  ++ *            - Buffer now always returned null-terminated.
  ++ *            - Return value now always -1 when we run out of room.
  ++ *
  +  *  01/05/01  [rcg]
  +  *            - Added Qstrlen, as a safe strlen.
  +  *
  +@@ -73,7 +77,8 @@
  + 
  + 
  + 
  +-#  define BUFSIZE 1024
  ++enum { BUFSIZE = 1024 };
  ++enum { NO_SIZE = 2147483647 };
  + 
  + #ifndef MIN
  + #  define MIN(A,B) ( ( (A) < (B) ) ? (A) : (B) )
  +@@ -135,7 +140,7 @@
  +                                         *     tokens. */
  +             *f      = NULL;            /* Pointer into frmToken */
  +     STATES   nState = IN_FORM; 
  +-    size_t   nSize  = n-1;
  ++    size_t   nSize  = n-1;             /* Maximum chars we'll handle */
  +     size_t   width  = 0;               /* If we have a width minimum */
  +     BOOL     bWidth = FALSE;           /* TRUE if width specified */
  +     size_t   limit  = 0;               /* If we have a length limiter */
  +@@ -185,8 +190,10 @@
  +                 if ( bWidth || bLimit )
  +                     if ( MAX ( width,   limit ) >
  +                          MIN ( BUFSIZE, nSize )
  +-                       )
  ++                       ) {
  ++                        *s = '\0';
  +                         return -1;
  ++                }
  + 
  +                 *f++ = *p;
  +                 *f   = '\0';
  +@@ -208,8 +215,10 @@
  +                 if ( bWidth || bLimit )
  +                     if ( MAX ( width,   limit ) >
  +                          MIN ( BUFSIZE, nSize )
  +-                       )
  ++                       ) {
  ++                        *s = '\0';
  +                         return -1;
  ++                }
  + 
  +                 *f++ = *p;
  +                 *f   = '\0';
  +@@ -227,8 +236,10 @@
  +                 if ( bWidth || bLimit )
  +                     if ( MAX ( width,   limit ) >
  +                          MIN ( BUFSIZE, nSize )
  +-                       )
  ++                       ) {
  ++                        *s = '\0';
  +                         return -1;
  ++                }
  + 
  +                 *f++ = *p;
  +                 *f   = '\0';
  +@@ -246,8 +257,10 @@
  +                 if ( bWidth || bLimit )
  +                     if ( MAX ( width,   limit ) >
  +                          MIN ( BUFSIZE, nSize )
  +-                       )
  ++                       ) {
  ++                        *s = '\0';
  +                         return -1;
  ++                }
  + 
  +                 /* 
  +                  * Get the string pointer.  If NULL, or if the maximum length
  +@@ -264,8 +277,10 @@
  +                 /*
  +                  * Make sure we have room if limit is unspecified.
  +                  */
  +-                if ( bLimit == FALSE && s_len >= nSize )
  +-                    return -1;
  ++                if ( bLimit == FALSE && s_len >= nSize ) {
  ++                        *s = '\0';
  ++                        return -1;
  ++                }
  +                 
  +                 /* 
  +                  * Handle minimum width
  +@@ -313,8 +328,10 @@
  +                     f += strlen ( f ); /* on some systems sprintf doesn't
  +                                           return length of added chars */
  +                 }
  +-                else
  ++                else {
  ++                    *s = '\0';
  +                     return -1;
  ++                }
  +                 break;
  +             
  +             case '0':
  +@@ -364,9 +381,24 @@
  +         } /* We're still inside a format */
  +     } /* for loop */
  +     
  +-    if ( nSize ) 
  ++    /*
  ++     * If we haven't run out of room, copy last character of
  ++     * format string (which is usually the terminating null).
  ++     * If we have run out of room, just make sure the buffer
  ++     * is null-terminated.
  ++     */
  ++    if ( nSize > 0 ) 
  +         *s++ = *p;
  +-    return ( (n-1) - nSize );
  ++    else
  ++        *s = '\0';
  ++
  ++    /*
  ++     * Return chars put in buffer (or -1 if we ran out of room)
  ++     */
  ++    if ( nSize == 0 && *p != '\0' )
  ++        return -1;
  ++    else
  ++        return ( (n-1) - nSize );
  + }
  + 
  + 
  +@@ -390,7 +422,7 @@
  +     va_list  ap;                       /* Pointer into stack to extract
  +                                         *     parameters */
  +     va_start ( ap, format );
  +-    rslt = Qvsnprintf ( s, 2147483647, format, ap );
  ++    rslt = Qvsnprintf ( s, NO_SIZE, format, ap );
  +     va_end   ( ap );
  +     return rslt;
  + }
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/qpopper/qpopper.spec
  ============================================================================
  $ cvs diff -u -r1.36.2.1 -r1.36.2.2 qpopper.spec
  --- openpkg-src/qpopper/qpopper.spec  18 Jan 2003 14:14:17 -0000      1.36.2.1
  +++ openpkg-src/qpopper/qpopper.spec  14 Mar 2003 09:55:36 -0000      1.36.2.2
  @@ -33,7 +33,7 @@
   Group:        Mail
   License:      GPL
   Version:      4.0.4
  -Release:      1.20030103
  +Release:      1.20030313
   
   #   package options
   %option       with_pam  no
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to