From: Adam Dickmeiss Date: Thu, 23 Nov 2006 14:01:21 +0000 (+0000) Subject: Use size of rec->info stuff in meta record fetch. Failing that will X-Git-Tag: ZEBRA.2.0.6~20 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=8e584bbdc77d4c825ed3596c4d8c24a0ab7300e5;p=idzebra-moved-to-github.git Use size of rec->info stuff in meta record fetch. Failing that will result in a SEGV or similar. --- diff --git a/index/retrieve.c b/index/retrieve.c index bbd2fc9..d981ec5 100644 --- a/index/retrieve.c +++ b/index/retrieve.c @@ -1,4 +1,4 @@ -/* $Id: retrieve.c,v 1.56 2006-11-23 09:03:51 marc Exp $ +/* $Id: retrieve.c,v 1.57 2006-11-23 14:01:21 adam Exp $ Copyright (C) 1995-2006 Index Data ApS @@ -336,17 +336,17 @@ int zebra_special_fetch(ZebraHandle zh, zint sysno, int score, ODR odr, "\n", sysno, - rec->info[recInfo_databaseName], - rec->info[recInfo_filename], - rec->info[recInfo_fileType], + rec->size[recInfo_databaseName], rec->info[recInfo_databaseName], + rec->size[recInfo_filename], rec->info[recInfo_filename], + rec->size[recInfo_fileType], rec->info[recInfo_fileType], score, recordAttr->staticrank, recordAttr->recordSize, @@ -356,17 +356,17 @@ int zebra_special_fetch(ZebraHandle zh, zint sysno, int score, ODR odr, *output_format = VAL_SUTRS; sprintf(rec_str, "sysno " ZINT_FORMAT "\n" - "base %s\n" - "file %s\n" - "type %s\n" + "base %.*s\n" + "file %.*s\n" + "type %.*s\n" "score %i\n" "rank " ZINT_FORMAT "\n" "size %i\n" "set zebra::%s\n", sysno, - rec->info[recInfo_databaseName], - rec->info[recInfo_filename], - rec->info[recInfo_fileType], + rec->size[recInfo_databaseName], rec->info[recInfo_databaseName], + rec->size[recInfo_filename], rec->info[recInfo_filename], + rec->size[recInfo_fileType], rec->info[recInfo_fileType], score, recordAttr->staticrank, recordAttr->recordSize,