bump product version to 4.1.6.2
[LibreOffice.git] / libexttextcat / exttextcat-memcpy.patch.1
blobb3e399a36072894b95f35084466ac98ca4e8d222
1 fix overlapped memcpy in heapextract
3 --- a/src/fingerprint.c 2013-07-04 22:53:25.674741538 +0200
4 +++ b/src/fingerprint.c 2013-07-04 22:54:09.009741166 +0200
5 @@ -254,7 +254,10 @@
6      p = &(t->heap[0]);
7  
8      memcpy(item, p, sizeof(entry_t));
9 -    memcpy(&(t->heap[0]), &(t->heap[t->size - 1]), sizeof(entry_t));
10 +    if (t->size > 1)
11 +    {
12 +        memcpy(&(t->heap[0]), &(t->heap[t->size - 1]), sizeof(entry_t));
13 +    }
15      siftdown(t, t->size, 0);
16      t->size--;