Closed GoogleCodeExporter closed 8 years ago
I looked into this some and here's some more information.
In chmfile.c check_file_ncase(), path and priv->hhc point to the same thing,
and a line does
g_free(path);
So now various effects can happen depending on who allocates the unallocated
memory that priv->hhc is still pointing to.
When check_file_ncase does
path = g_path_get_basename(found);
I suspect it just happens to work by allocating memory in the right place most
of the time.
Later the function gets entered again, probably for priv->hhk.
Both of priv->hhc and priv->hhk can get corrupted.
Original comment by strobert@gmail.com
on 17 Jun 2010 at 8:40
It seems the g_path_get_basename() function's behavior is not like what it said
in the glib document.
So I add a g_strdup() to copy it's value before return to check_file_ncase().
The bugfix has been committed to github, please test it again. Thank you!
Original comment by jungl...@gmail.com
on 21 Jun 2010 at 7:50
Great; thanks! I confirm that this bug is fixed in git
a5be08a2b5f117ad156f5eac09ff593da6d1489b 2010-06-21, in both Ubuntu 10.04 Lucid
and 9.10 Karmic.
Original comment by strobert@gmail.com
on 24 Jun 2010 at 7:45
Original comment by jungl...@gmail.com
on 28 Jun 2010 at 8:23
Original issue reported on code.google.com by
strobert@gmail.com
on 16 Jun 2010 at 11:45