aboutsummaryrefslogtreecommitdiffstats
path: root/main/quvi/fix-memcorruption.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2014-12-02 08:46:10 +0200
committerTimo Teräs <timo.teras@iki.fi>2014-12-02 08:46:10 +0200
commitbdd10db3652b63c24caf8d8ab626fdbb31152fac (patch)
tree466f564c78dc985a04573e1f937c1b82d09354ff /main/quvi/fix-memcorruption.patch
parent71056c4d40bd0473ce7b41b21475e4c632355469 (diff)
downloadaports-bdd10db3652b63c24caf8d8ab626fdbb31152fac.tar.bz2
aports-bdd10db3652b63c24caf8d8ab626fdbb31152fac.tar.xz
main/quvi: fix memory corruption
Diffstat (limited to 'main/quvi/fix-memcorruption.patch')
-rw-r--r--main/quvi/fix-memcorruption.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/main/quvi/fix-memcorruption.patch b/main/quvi/fix-memcorruption.patch
new file mode 100644
index 0000000000..4ffe254503
--- /dev/null
+++ b/main/quvi/fix-memcorruption.patch
@@ -0,0 +1,28 @@
+diff -ru quvi-0.9.5.orig/src/util/regex.c quvi-0.9.5/src/util/regex.c
+--- quvi-0.9.5.orig/src/util/regex.c 2013-07-16 17:55:23.000000000 -0300
++++ quvi-0.9.5/src/util/regex.c 2014-12-02 08:41:56.003383594 -0200
+@@ -194,9 +194,8 @@
+ g_free(op->sequence);
+ g_free(op->regex);
+ g_free(op->mode);
+- g_free(op);
+-
+ memset(op, 0, sizeof(struct _lutil_regex_op_s));
++ g_free(op);
+ }
+
+ static gchar *_op_m(lutil_regex_op_t op, const gchar *s)
+diff -ru quvi-0.9.5.orig/src/util/xchg.c quvi-0.9.5/src/util/xchg.c
+--- quvi-0.9.5.orig/src/util/xchg.c 2013-11-10 09:58:30.000000000 -0200
++++ quvi-0.9.5/src/util/xchg.c 2014-12-02 08:42:55.756717512 -0200
+@@ -260,9 +260,8 @@
+
+ g_hash_table_destroy(p->htable);
+ g_regex_unref(p->re);
+- g_free(p);
+-
+ memset(p, 0, sizeof(struct _lutil_xchg_seq_s));
++ g_free(p);
+ }
+
+ /* Replace the sequences in the given string (g_free the returned string). */