Author: sjg
Date: Thu Nov 14 00:06:44 2013
New Revision: 258113
URL: http://svnweb.freebsd.org/changeset/base/258113

Log:
  Avoid SEGV when passed NULL for list

Modified:
  head/contrib/bmake/lst.lib/lstMember.c

Modified: head/contrib/bmake/lst.lib/lstMember.c
==============================================================================
--- head/contrib/bmake/lst.lib/lstMember.c      Thu Nov 14 00:02:18 2013        
(r258112)
+++ head/contrib/bmake/lst.lib/lstMember.c      Thu Nov 14 00:06:44 2013        
(r258113)
@@ -58,6 +58,9 @@ Lst_Member(Lst l, void *d)
     List               list = l;
     ListNode   lNode;
 
+    if (list == NULL) {
+       return NULL;
+    }
     lNode = list->firstPtr;
     if (lNode == NULL) {
        return NULL;
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to