[balsa/wip/gmime3: 17/197] Assert that a node is not NULL
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/wip/gmime3: 17/197] Assert that a node is not NULL
- Date: Wed, 23 May 2018 21:13:47 +0000 (UTC)
commit 05046b621321645dc4d2cdcc60f1e80f57b3190f
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Wed Jun 28 16:33:03 2017 -0400
Assert that a node is not NULL
* libbalsa/mailbox.c (lbm_next): assert that node is not NULL
before testing whether it is the root node
ChangeLog | 8 ++++++++
libbalsa/mailbox.c | 1 +
2 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d6649f0..a7b283a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2017-06-28 Peter Bloomfield <pbloomfield bellsouth net>
+ Assert that a node is not NULL
+
+ * libbalsa/mailbox.c (lbm_next): assert that node is not NULL
+ before testing whether it is the root node
+
+
+2017-06-28 Peter Bloomfield <pbloomfield bellsouth net>
+
Check for NULL pointer
* libbalsa/mailbox.c (lbm_sort): check for NULL prev.
diff --git a/libbalsa/mailbox.c b/libbalsa/mailbox.c
index 38d3a51..fe75f39 100644
--- a/libbalsa/mailbox.c
+++ b/libbalsa/mailbox.c
@@ -1735,6 +1735,7 @@ lbm_next(GNode * node)
if (node->next)
return node->next;
node = node->parent;
+ g_assert(node != NULL);
} while (!G_NODE_IS_ROOT(node));
return node;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]