Re: [evolution-patches] Re: 43485: strftime usage in e-cell-date



probably better to use memcpy, especially since s and buf do not
overlap.

also:

sz = MIN (sz, max - 1);
memcpy (s, buf, sz);
s[sz] = '\0';

otherwise there is a potential ABW.

Jeff

On Fri, 2003-05-23 at 17:06, Mike Kestner wrote:
> On Fri, 2003-05-23 at 14:11, Jeffrey Stedfast wrote:
> 
> > > But since this is a function scope stack variable and memory is cheap,
> > > if 26 is marginal, perhaps I should just bump it to 100 and avoid any
> > > risk?
> > 
> > sure, sounds good to me.
> 
> So after a big discussion on irc, the patch is growing...
> 
> This adds new utf8-friendly api to gal and uses it in e-cell-date.  The
> mailer and addrbook need to be updated to use the new funcs.  The
> calendar currently uses g_date_strftime, which apparently ignores any
> time formatters in the fmt string, so if calendar needs to show time, it
> needs to use this too, probably.
> 
> Mike
-- 
Jeffrey Stedfast
Evolution Hacker - Ximian, Inc.
fejj ximian com  - www.ximian.com




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