From 8e584bbdc77d4c825ed3596c4d8c24a0ab7300e5 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 23 Nov 2006 14:01:21 +0000 Subject: [PATCH] Use size of rec->info stuff in meta record fetch. Failing that will result in a SEGV or similar. --- index/retrieve.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) 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, -- 1.7.10.4