From 97756a0d0fba8437bc029fbece8b48fb4846b00f Mon Sep 17 00:00:00 2001 From: hackbard Date: Mon, 8 Nov 2004 12:34:36 +0000 Subject: [PATCH] hopefully final bugfix to not et segfaulst using list_next --- list/list.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/list/list.c b/list/list.c index 13493e6..0cfb441 100644 --- a/list/list.c +++ b/list/list.c @@ -83,6 +83,11 @@ int list_search_data(t_list *list,void *data,int first_bytes) { list_reset(list); + if(list->start==NULL) { + dprintf(list->outfd,"[list] empty list\n"); + return L_EMPTY_LIST; + } + do { if(list->current!=NULL) if(first_bytes<=list->current->data_len) -- 2.20.1