Prevent memcpy overlap
authorAdam Dickmeiss <adam@indexdata.dk>
Mon, 21 May 2012 14:09:45 +0000 (16:09 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Mon, 21 May 2012 14:09:45 +0000 (16:09 +0200)
Happens inside zebra_replace. Simply don't call it here. It has
no effect - except for copying it to WRBUF.

index/extract.c

index a4688e5..6f4a812 100644 (file)
@@ -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);