Namazu-users-en(old)


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Access Violation on nmz_get_field_data



In article <3C862F28.7080603@xxxxxxxxx>
carlos@xxxxxxxxx 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@xxxxxxxxxxxxx
	knok@xxxxxxxxxx / knok@xxxxxxxxxx