RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: popt/ CHANGES poptparse.c

From: Jeff Johnson <jbj@rpm5.org>
Date: Thu 12 Jul 2007 - 19:22:45 CEST
Message-Id: <20070712172245.20D483484F1@rpm5.org>
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  jbj@rpm5.org
  Module: popt                             Date:   12-Jul-2007 19:22:45
  Branch: HEAD                             Handle: 2007071218224400

  Modified files:
    popt                    CHANGES poptparse.c

  Log:
    - plug a memory leak.

  Summary:
    Revision    Changes     Path
    1.15        +2  -1      popt/CHANGES
    1.24        +3  -1      popt/poptparse.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: popt/CHANGES
  ============================================================================
  $ cvs diff -u -r1.14 -r1.15 CHANGES
  --- popt/CHANGES	22 Jun 2007 00:02:01 -0000	1.14
  +++ popt/CHANGES	12 Jul 2007 17:22:44 -0000	1.15
  @@ -1,4 +1,5 @@
  -1.11 -> 1.11.1
  +1.11 -> 1.12
  +    - jbj: plug a memory leak.
       - jbj: fix index thinko.
       
   1.5 -> 1.6
  @@ .
  patch -p0 <<'@@ .'
  Index: popt/poptparse.c
  ============================================================================
  $ cvs diff -u -r1.23 -r1.24 poptparse.c
  --- popt/poptparse.c	14 Jun 2007 13:31:10 -0000	1.23
  +++ popt/poptparse.c	12 Jul 2007 17:22:44 -0000	1.24
  @@ -162,8 +162,10 @@
   	    p++;
   
   	linelen = strlen(p);
  -	if (linelen >= maxlinelen-1)
  +	if (linelen >= maxlinelen-1) {
  +	    free(argstr);
   	    return POPT_ERROR_OVERFLOW;	/* XXX line too long */
  +	}
   
   	if (*p == '\0' || *p == '\n') continue;	/* line is empty */
   	if (*p == '#') continue;		/* comment line */
  @@ .
Received on Thu Jul 12 19:22:45 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.