From ce9af28e0299ae0ee246fa6d003ba29d374397df Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 13 Aug 2007 12:42:45 +0000 Subject: [PATCH] Fixed bug #1359: Pazpar2 reading uninitialized memory when sorting. The offset is -1 when relevance is in effect. We just use value 0 instead. --- src/reclists.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/reclists.c b/src/reclists.c index 783025f..048914d 100644 --- a/src/reclists.c +++ b/src/reclists.c @@ -1,4 +1,4 @@ -/* $Id: reclists.c,v 1.20 2007-07-23 12:23:30 adam Exp $ +/* $Id: reclists.c,v 1.21 2007-08-13 12:42:45 adam Exp $ Copyright (c) 2006-2007, Index Data. This file is part of Pazpar2. @@ -110,7 +110,7 @@ struct reclist_sortparms *reclist_parse_sortparms(NMEM nmem, const char *parms) const char *cpp; int increasing; int i; - int offset; + int offset = 0; enum conf_sortkey_type type; struct reclist_sortparms *new; @@ -129,7 +129,6 @@ struct reclist_sortparms *reclist_parse_sortparms(NMEM nmem, const char *parms) if (!strcmp(parm, "relevance")) { type = Metadata_sortkey_relevance; - offset = -1; } else { -- 1.7.10.4