namazu-users-en
[Top] [All Lists]

Re: Access Violation on nmz_get_field_data

To: namazu-users-en@namazu.org
Subject: Re: Access Violation on nmz_get_field_data
From: knok@daionet.gr.jp (NOKUBI Takatsugu)
Date: Thu, 7 Mar 2002 17:20:19 JST
Reply-to: namazu-users-en@namazu.org
Message-id: <200203070820.RAA12353@ns1.eal.or.jp>
In article <3C862F28.7080603@rovia.com>
carlos@rovia.com writes:

Thank you very much for the quick response.  I tried the functions you 
suggested, and still had the problem.  I did get it to work, though, by 
passing heap-allocated buffers of size BUFSIZE (defined in libnamazu.h) 
for the fieldname and data parameters of nmz_get_field_data.  I suspect 
there must be an overwrite of sorts in the function.

Your suspection is roughly right, but not for field name. According to
nmz/field.c, nmz_get_field_data is defined like the following:

void
nmz_get_field_data(int idxid, int docid, const char *field, char *data)

So you can use constant string as field argument. I maintain
Search::Namazu perl module and it also uses constant string.
You can see it via ViewCVS:
http://cvs.namazu.org/Search-Namazu/Namazu.xs?rev=1.18&content-type=text/vnd.viewcvs-markup

Sorry for lack of documents about the library. I need more description
about it but I have my hands full...
-- 
NOKUBI Takatsugu
E-mail: knok@daionet.gr.jp
        knok@namazu.org / knok@debian.org


<Prev in Thread] Current Thread [Next in Thread>