[Pkg-shadow-commits] r3221 - in upstream/trunk: . lib
Nicolas FRANÇOIS
nekral-guest at alioth.debian.org
Fri Aug 20 20:34:45 UTC 2010
Author: nekral-guest
Date: 2010-08-20 20:34:44 +0000 (Fri, 20 Aug 2010)
New Revision: 3221
Modified:
upstream/trunk/ChangeLog
upstream/trunk/lib/commonio.c
Log:
* lib/commonio.c: Make sure there are no NULL pointer dereference.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2010-08-20 20:27:34 UTC (rev 3220)
+++ upstream/trunk/ChangeLog 2010-08-20 20:34:44 UTC (rev 3221)
@@ -1,5 +1,9 @@
2010-08-20 Nicolas François <nicolas.francois at centraliens.net>
+ * lib/commonio.c: Make sure there are no NULL pointer dereference.
+
+2010-08-20 Nicolas François <nicolas.francois at centraliens.net>
+
* libmisc/remove_tree.c: Ignore snprintf return value.
2010-08-20 Nicolas François <nicolas.francois at centraliens.net>
Modified: upstream/trunk/lib/commonio.c
===================================================================
--- upstream/trunk/lib/commonio.c 2010-08-20 20:27:34 UTC (rev 3220)
+++ upstream/trunk/lib/commonio.c 2010-08-20 20:34:44 UTC (rev 3221)
@@ -713,6 +713,7 @@
for (ptr = db->head;
(NULL != ptr)
#if KEEP_NIS_AT_END
+ && (NULL != ptr->line)
&& ('+' != ptr->line[0])
#endif
;
@@ -720,7 +721,7 @@
n++;
}
#if KEEP_NIS_AT_END
- if (NULL != ptr) {
+ if ((NULL != ptr) && (NULL != ptr->line)) {
nis = ptr;
}
#endif
@@ -741,7 +742,10 @@
#else
NULL != ptr;
#endif
- ptr = ptr->next) {
+/*@ -nullderef @*/
+ ptr = ptr->next
+/*@ +nullderef @*/
+ ) {
entries[n] = ptr;
n++;
}
More information about the Pkg-shadow-commits
mailing list