Re: A stupid question about libtinymail



On Sun, 2007-12-02 at 13:50 +0200, Milko Krachounov wrote:

> Erm, I've not implemented reading from my text widget at all at the
> moment, I was looking at the code to see how it was implemented. I
> noticed that it is incorrectly implemented and decided that I should
> report it in some way.

You did right, don't worry :)

> I decided not to write a patch, because I might
> be overlooking something, and preferred to just point it out on the
> mailing list, so that it can be confirmed.

Confirmed.

> I'm sorry for the way I did
> report it, but when it was in the middle of the night, and I was in a
> terrible need of sleep -- I didn't even check the latest repository to
> make sure it's not fixed already.

Oh, you don't have to feel sorry for reporting a bug! That's always fine
of course.

> Currently the text is read from priv->cur to dest. dest points at
> rlength. If I'm reading with 512 buffers, it will read from the 0 to 512
> the first time, and will try from 512 to 512 the second time, and
> strncpy should crash at this point.

ok

> I'm not competent enough to write a patch, because I could be off by
> one, and I don't want to guess without testing, though I believe my
> suggestion is correct, as the range doesn't include the end, according
> to gtk_text_buffer_get_text documentation.

ok

> If I get to use or test that function, and it still hasn't been fixed,
> I'll submit a tested patch.

Yes, that would be great.

Thanks!

-- 
Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
http://pvanhoof.be/blog
http://codeminded.be






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