shithub: mc

Download patch

ref: 35bfc4bc1c92546368e13c7eb20f8f7c4c9b404b
parent: 342be478e2d49ac4c33e800a6b076f91f6ba5ed6
author: Ori Bernstein <[email protected]>
date: Mon Jan 9 19:22:09 EST 2012

Assert that nodes inserted into nodelists are non-null

--- a/parse/node.c
+++ b/parse/node.c
@@ -229,6 +229,8 @@
 
 void nlappend(Node ***nl, size_t *len, Node *n)
 {
+    assert(n != NULL);
+
     *nl = xrealloc(*nl, (*len + 1)*sizeof(Node*));
     (*nl)[*len] = n;
     (*len)++;