Re: memory scribbling while using IOChannels



On Fri, Aug 24, 2001 at 10:45:51AM +0200, Matthias Clasen wrote:
> It looks at least suspicious that  g_iochannel_fill_buffer holds a reference
> to channel->encoded_read_buf->str
> over the g_string_set_size call, because g_string_set_size may end up
> reallocating that pointer (in g_string_maybe_expand).
> 
> The following patch seems to fix your test case.

	Ooo!  That's a good eye!  This is why we have a devel-list :-)
I will test this later when I get to work, but this is a very possible
solution.  Thanks man!

Joel

-- 

"Sometimes I think the surest sign intelligent
 life exists elsewhere in the universe is that
 none of it has tried to contact us."
                                -Calvin & Hobbes

			http://www.jlbec.org/
			jlbec evilplan org




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]