On Wed, 8 Aug 2012, Frederic Koehler wrote:

> Hm, I'd be surprised if this patch had any effect: sizeof of a string literal
> should give the number of bytes in it [which is a really
> weird special case of C, see
> http://en.wikipedia.org/wiki/Sizeof#Using_sizeof_with_arrays]
> Although, strlen is a lot more obviously correct [curiously,
> adding the +3 instead of +1 is actually the correct number for strlen,
> which doesn't count '\0'] .
>

I think it's a difference between:

sizeof(char *)
and
sizeof(char [])

I've seen this kind of mistake made before.

> Perhaps just updating to git fixed the segfault?
>

Well there were a few segv's fixed in the last 24hrs... I do believe
this code was wrong.

> Also I think the reason the patch didn't apply is probably because the
> mailer mangled it, like Marc guessed.
> Email clients particularly relish destroying a programmer's hard work.
>

Yep, why I'm recommending submitted patches be sent as attachments.

[...]
-- 
Jon Trulson

"If the Martian rope-a-dope don't get him, he'll get himself, he'll
  come in too fast and punch himself out."
              - one of my brothers, referring to the Curiosity landing.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel

Reply via email to