[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [PATCH] mdev regex fix
From: Denys Vlasenko <vda.linux () googlemail ! com>
Date: 2008-05-24 20:49:32
Message-ID: 200805242249.32830.vda.linux () googlemail ! com
[Download RAW message or body]
On Saturday 24 May 2008 09:22, Natanael Copa wrote:
> You are absolutely right. Didn't think of that.
>
> >
> > /* substitute %1..9 with off[1..9], if any */
> > n = 0;
> > s = val;
>
> Problem is in the line below here (yeah, i got tricked by it too and
> assumed that the buf was big enough). It does not do what you think it
> does:
>
> > while (*s && *s++ == '%')
> > n++;
>
> Should be:
>
> while (*s)
> if (*s++ == '%')
> n++;
Fixed now, thanks for debugging this.
--
vda
_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic