RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Olivier Thauvin
Root: /v/rpm/cvs Email: nanardon@rpm5.org
Module: rpm Date: 18-Aug-2008 12:57:58
Branch: HEAD Handle: 2008081810575800
Modified files:
rpm/rpmconstant rpmconstant.c
Log:
- ensure name of constant is not NULL before return element, this can
happend in case of empty list, first elem is the end
Summary:
Revision Changes Path
1.9 +2 -2 rpm/rpmconstant/rpmconstant.c
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/rpmconstant/rpmconstant.c
============================================================================
$ cvs diff -u -r1.8 -r1.9 rpmconstant.c
--- rpm/rpmconstant/rpmconstant.c 2 Apr 2008 18:35:27 -0000 1.8
+++ rpm/rpmconstant/rpmconstant.c 18 Aug 2008 10:57:58 -0000 1.9
@@ -1,5 +1,5 @@
/* Nanar <nanardon@zarb.org>
- * $Id: rpmconstant.c,v 1.8 2008/04/02 18:35:27 rse Exp $
+ * $Id: rpmconstant.c,v 1.9 2008/08/18 10:57:58 nanardon Exp $
*/
#include "system.h"
@@ -36,7 +36,7 @@
c->constant = c->constant == NULL ?
rpmConstantListC(c->list) :
rpmConstantNext(c->constant);
- return c->constant == NULL ? 0 : 1;
+ return c->constant != NULL && rpmConstantName(c->constant) != NULL ? 1 : 0;
}
@@ .
Received on Mon Aug 18 12:57:58 2008