On Fri, Jul 14, 2006 at 10:18:28AM +0200, Viktor Griph wrote:
> On Fri, 14 Jul 2006, Dominik Vogt wrote:
> 
> >On Fri, Jul 14, 2006 at 09:07:21AM +0200, Viktor Griph wrote:
> >>On Fri, 14 Jul 2006, Scott Smedley wrote:
> >>>>I think there is a bug in FVWM's parameter expansion.
> >>>>FVWM crashes with a simple command such as:
> >>>>
> >>>>Echo $[0]
> >>>
> >>>Is this supposed to be fixed? FVWM still crashes on my system
> >>>when I type "Echo $[0]" in FvwmConsole.
> >>>
> >>>I am using current version of CVS.
> >>
> >>There is something wrong with __eae_parse_range. I'm not that good on
> >>sscanf, but I think that it will match "%u-%n" even for "0" and return a
> >>good number, meaning that n will have a random value.
> >
> >Yes, one big problem is that %n may or may not increase the return
> >code by one, so if
> >
> > rc = scanf(..., "%u-%n", ...);
> >
> >returns one, this can mean is parsed just the integer and stopped,
> >or it parsed the integer, found a '-' and assigned the %n too.
> >
> >Fixed.
> >
> 
> sscanf seems to not be very restrictive when it comes to unsigned 
> integers. It seems as if it accepts signed integers as well. At least 
> $[-1] hang fvwm now.

It doesn't actually hang but tries to skip 2^32-1 tokens.  It's a
but in Parse.c.

Fixed.

Ciao

Dominik ^_^  ^_^

 --
Dominik Vogt, [EMAIL PROTECTED]

Attachment: signature.asc
Description: Digital signature

Reply via email to