From 45a9eeea727b174e1c6e1c7d7875f8c746d3178a Mon Sep 17 00:00:00 2001 From: Marc Cromme Date: Wed, 11 Apr 2007 11:13:46 +0000 Subject: [PATCH] added assert to prevent segfault by dereferencing void pointer 'settings' --- src/database.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/database.c b/src/database.c index 639e8f2..61131a5 100644 --- a/src/database.c +++ b/src/database.c @@ -1,4 +1,4 @@ -/* $Id: database.c,v 1.10 2007-04-11 04:33:41 quinn Exp $ +/* $Id: database.c,v 1.11 2007-04-11 11:13:46 marc Exp $ Copyright (c) 2006-2007, Index Data. This file is part of Pazpar2. @@ -241,6 +241,7 @@ static int match_criterion(struct setting **settings, struct database_criterion int database_match_criteria(struct setting **settings, struct database_criterion *cl) { + assert(settings); if (settings[PZ_ALLOW] && *settings[PZ_ALLOW]->value == '0') return 0; for (; cl; cl = cl->next) -- 1.7.10.4