RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  j...@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);
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                rpm-cvs@rpm5.org

Reply via email to