From: Adam Dickmeiss Date: Mon, 21 May 2012 14:09:45 +0000 (+0200) Subject: Prevent memcpy overlap X-Git-Tag: v2.0.51~8 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=d182c066dcf77c0b3802e4641950c13c3b92498a;p=idzebra-moved-to-github.git Prevent memcpy overlap Happens inside zebra_replace. Simply don't call it here. It has no effect - except for copying it to WRBUF. --- diff --git a/index/extract.c b/index/extract.c index a4688e5..6f4a812 100644 --- a/index/extract.c +++ b/index/extract.c @@ -1823,7 +1823,6 @@ static void extract_token_add(RecWord *p) { ZebraHandle zh = p->extractCtrl->handle; zebra_map_t zm = zebra_map_get_or_add(zh->reg->zebra_maps, p->index_type); - WRBUF wrbuf; if (log_level_details) { @@ -1832,11 +1831,6 @@ static void extract_token_add(RecWord *p) p->index_type, p->index_name, p->seqno, p->term_len, p->term_buf); } - if ((wrbuf = zebra_replace(zm, 0, p->term_buf, p->term_len))) - { - p->term_buf = wrbuf_buf(wrbuf); - p->term_len = wrbuf_len(wrbuf); - } if (zebra_maps_is_icu(zm)) { extract_add_icu(p, zm);