Re: still getting errors with CRM

"Ger Hobbelt" <[email protected]>
Newsgroups gmane.mail.spam.crm114
Message-ID <[email protected]>
*SIGH*

Gentlemen...

It's *not* a 64-bit issue.


Today has gone belly up for me, the only positive thing is I've got
Internet access as a result. Anyway, temper is somewhat on the short
side, so I'll keep this short too.


Get the attached 7z file - it's a patched expandvar C sourcefile from
VANILLA BillY crm114 straight from WGET from about 1-2 weeks ago. And,
no, I don't have diff available right now.

It's not about strings with '\' as the LAST char, it's about strings
which have a '\' FOLLOWING them, i.e. a '\' which is NOT PART OF THE
STRING.

Think
buf[] = "hello".
That's
buflen=5
so 'o' is at
buf[4] (remember, 'C' is zero-based)
and the '\' is here:
buf[5] == '\\'   !!!

I don't have diff or other tools available right now, but the change I
applied is very simple: take the expandvar function, before you do
ANYTHING, you 'remember' the character ONE(1) BEYOND the string space
(hack_c variable in that next 7z-ipped code I attached) and make sure
you restore it once expandvar is done, so you didn't screw up anything
important.

Next, following the copy to hack_c var line at the start of
expandvar(), overwrite that buffer position (one(1) beyond the
reporting input length) with a SPACE (' '):

	buf[inlen] = ' ';

Run
  make && make megatest
--: NO difference from the usual. Like it should. (I tested this;
please *VERIFY* me.)

Now change that SPACE ' ' to a '\\' escape slash:

	buf[inlen] = '\\';

and run
  make && make megatest
again. If you are as 'lucky' as me, you WILL see a *completely* FUBAR output.
Again, don't take my word for it: *VERIFY* me.


Once verified and shown that either I should have kept my trap zipped
today OR that your results match my FUBAR ones, you may consider
applying a code review to expandvar. Because just 'fixing the unescape
loop' is not enough and let me assure you: some bugs don't get caught
any . other . way . - assuming it's not 'just me' who's seeing this...
If it IS 'just me', I'll submit to your just punishment(s).


My apologies for being blunt. I've got no excuse but an already
@#$%^&* day. It's past 12 PM and my 'professionalism' is fading.
I'm just relieved this doesn't fester for 2 weeks. My god.


Ger


PS: get /rid/ of my hack_c change when you've done VERIFYING, because
it's only there to prove a point, nothing else.

PPS: diffs for actual fixes have been posted to the ML day before
yesterday. I know, those diffs include CRM_MIN/MAX/ASSERT macros which
don't come with the vanilla version, so 'merging in' those diffs may
take some effort. When desired and everything turns out the way I
expect it to turn out, I can see if there's time for a
direct-to-vanilla fix the next few days.




On Wed, Apr 30, 2008 at 5:29 PM, Paolo <[email protected]> wrote:
> On Wed, Apr 30, 2008 at 10:31:55AM -0400, Bill Y wrote:
>  >
>  > (and darn it, I need a 64bit laptop to deal with this sort of thing.
>
>  or setup a VM via qemu.
>
>  --
>  paolo
>
>
>
>  -------------------------------------------------------------------------
>  This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
>  Don't miss this year's exciting event. There's still time to save $100.
>  Use priority code J8TL2D2.
>  http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>  _______________________________________________
>  Crm114-general mailing list
>  [email protected]
>  https://lists.sourceforge.net/lists/listinfo/crm114-general
>
>



-- 
Met vriendelijke groeten / Best regards,

Ger Hobbelt

--------------------------------------------------
web: http://www.hobbelt.com/
 http://www.hebbut.net/
mail: [email protected]
mobile: +31-6-11 120 978
--------------------------------------------------

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

_______________________________________________
Crm114-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crm114-general
crm_expandvar.c.7z (application/x-7z-compressed, 7.9 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.