Re: [evolution-patches] fix for bug #41362 - revised



This is still not right, you're still doing buf += strlen(canonname),
which will lead to unaligned access.

just do
len = ALIGN(len);
after the len=strlen(canonname);
actually, you should do len = strlen(canonname)+1 anyway ...

and you dont have to do the innaccurate
   if (buflen < blah + len + sizeof(char *))
either

the value 'len' is only used to increment past the string/calculate
size, not to copy the string or anything, so it doesn't have to be
byte-accurate to the string content.

On Sat, 2003-04-19 at 03:45, Jeffrey Stedfast wrote:
> ok, new patch based on notzed's comments.
> 
> Jeff
> 
> On Thu, 2003-04-17 at 15:13, Jeffrey Stedfast wrote:
> > http://bugzilla.ximian.com/show_bug.cgi?id=41362
> > 
> > I believe the problem is that of memory alignment, but I can't really be
> > sure.
> > 
> > presuming it is memory alignment, I think this patch should fix it.
> > 
> > Jeff




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