Re: [evolution-patches] Fix for Evolution 1.2 shortcut migration



Can we guarantee what we're gettting is valid utf8?  I guess libxml could validate it for us, but, well, you know libxml ...

+       while (*p) {
+               g_string_append_c(out,(char) g_utf8_get_char(p));
+               p = g_utf8_next_char (p);
+       }


Otherwise ^^ could end up in an infinite loop, or trapsing over memory.


On Thu, 2003-09-11 at 16:43 +0200, Frederic Crozat wrote:
> On Wed, 2003-09-10 at 12:15, Frederic Crozat wrote:
> > I'll try to do a new version of my patch tomorrow.. (probably not in
> > time for 1.4.5)..
> 
> If you send it in tomorrow it can definitely go in 1.4.5.
> 
> At any rate, thanks in advance for your help with this!

Here is it.. I've kept this utf8 undecypher outside xml1_decode because
I'm not sure of its effect on other xml1 strings (ie nodes) and I don't
want to break everything before 1.4.5 :))

I didn't add ChangeLog entry yet because I usually add it just before
committing..

-- 
Frederic Crozat <fcrozat mandrakesoft com>
Mandrakesoft


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