dictionary: Allow dict_set_documents() argument to reference old documents.
authorBen Pfaff <blp@cs.stanford.edu>
Tue, 5 Oct 2021 16:19:26 +0000 (09:19 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Tue, 5 Oct 2021 16:19:26 +0000 (09:19 -0700)
commit7ae167da42b6b2fb0701bcf6929b15cbceeede53
tree97a5629cce2883aeea7e315be9b594fe6816cd6e
parentdb8e899446fa2679235ce3091dc4eebe33429a99
dictionary: Allow dict_set_documents() argument to reference old documents.

merge_dictionary() in combine-file.c includes the old documents in the new
ones by just copying pointers.  dict_set_documents() didn't handle this
properly.  This fixes the problem.

Fixes bug #61258.
Thanks to Irfan Ariq for reporting the problem.
src/data/dictionary.c