summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2014-06-04 23:25:52 +0100
committerTim-Philipp Müller <tim@centricular.com>2014-06-04 23:34:13 +0100
commit5763373b60ac970d4a9154de8cb3994b52e76efb (patch)
treeafc5d098133b6ad1593e6e8be68deebb1f05e59d
parent7408b73c0ec138ffacd89ed9f7d3f9a0079d8916 (diff)
orccodemem: fix list corruption when splitting memory chunks in two
When splitting orc memory chunks in two, the 'prev' pointer of the new memory chunk to be inserted was wrong, causing invalid memory access and double frees later down the line. https://bugzilla.gnome.org/show_bug.cgi?id=731227
-rw-r--r--orc/orccodemem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/orc/orccodemem.c b/orc/orccodemem.c
index 2c93f77..7bb78d2 100644
--- a/orc/orccodemem.c
+++ b/orc/orccodemem.c
@@ -88,7 +88,7 @@ orc_code_chunk_split (OrcCodeChunk *chunk, int size)
newchunk->offset = chunk->offset + size;
newchunk->size = chunk->size - size;
newchunk->next = chunk->next;
- newchunk->prev = chunk->prev;
+ newchunk->prev = chunk;
chunk->size = size;
if (chunk->next) {