RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: popt/ poptint.c

From: Jeff Johnson <jbj@rpm5.org>
Date: Mon 09 Aug 2010 - 19:31:45 CEST
Message-Id: <20100809173145.5A4E4D0F09@rpm5.org>
  RPM Package Manager, CVS Repository
  /cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  jbj@rpm5.org
  Module: popt                             Date:   09-Aug-2010 19:31:45
  Branch: HEAD                             Handle: 2010080917314500

  Modified files:
    popt                    poptint.c

  Log:
    - fix: obscure iconv mis-call error path could lead to strdup(NULL)
    (coverity).

  Summary:
    Revision    Changes     Path
    1.28        +1  -1      popt/poptint.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: popt/poptint.c
  ============================================================================
  $ cvs diff -u -r1.27 -r1.28 poptint.c
  --- popt/poptint.c	18 Jun 2010 02:03:29 -0000	1.27
  +++ popt/poptint.c	9 Aug 2010 17:31:45 -0000	1.28
  @@ -145,7 +145,7 @@
   	}
   	(void) iconv_close(cd);
   	*pout = '\0';
  -	ostr = xstrdup(dstr);
  +	ostr = xstrdup(dstr ? dstr : istr);
   	free(dstr);
       } else
   	ostr = xstrdup(istr);
  @@ .
Received on Mon Aug 9 19:31:45 2010
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.