Bump for 3.6-28
[LibreOffice.git] / liblangtag / liblangtag-0.2-0002-Fix-invalid-memory-access.patch
blobb3b0ff316e3e0f5e0fe991c306de802f45a37538
1 From cf8dfcf1604e534f4c9eccbd9a05571c8a9dc74d Mon Sep 17 00:00:00 2001
2 Message-Id: <cf8dfcf1604e534f4c9eccbd9a05571c8a9dc74d.1337190149.git.erack@redhat.com>
3 From: Akira TAGOH <akira@tagoh.org>
4 Date: Mon, 5 Mar 2012 18:10:10 +0900
5 Subject: [PATCH] Fix invalid memory access
6 MIME-Version: 1.0
7 Content-Type: multipart/mixed; boundary="------------erAck-patch-parts"
9 This is a multi-part message in MIME format.
10 --------------erAck-patch-parts
11 Content-Type: text/plain; charset=UTF-8; format=fixed
12 Content-Transfer-Encoding: 8bit
14 ---
15 liblangtag/lt-extension.c | 5 ++++-
16 1 files changed, 4 insertions(+), 1 deletions(-)
19 --------------erAck-patch-parts
20 Content-Type: text/x-patch; name="0001-Fix-invalid-memory-access.patch"
21 Content-Transfer-Encoding: 8bit
22 Content-Disposition: attachment; filename="0001-Fix-invalid-memory-access.patch"
24 diff --git a/liblangtag/lt-extension.c b/liblangtag/lt-extension.c
25 index 806712e..502bfd5 100644
26 --- a/liblangtag/lt-extension.c
27 +++ misc/build/liblangtag-0.2/liblangtag/lt-extension.c
28 @@ -196,6 +196,8 @@ lt_extension_cancel_tag(lt_extension_t *extension)
29 if (ll->prev)
30 ll->prev->next = NULL;
31 ll->prev = NULL;
32 + if (ll == l)
33 + l = NULL;
34 g_list_free(ll);
35 break;
37 @@ -204,7 +206,8 @@ lt_extension_cancel_tag(lt_extension_t *extension)
38 else
39 g_string_append(extension->cached_tag, ll->data);
41 - g_list_free(l);
42 + if (l)
43 + g_list_free(l);
44 g_strfreev(tags);
48 --------------erAck-patch-parts--