[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [BusyBox] dietlibc patch for pre5
From:       "Vladimir N. Oleynik" <dzo () simtreas ! ru>
Date:       2004-01-31 16:40:52
Message-ID: 401BDA94.80504 () simtreas ! ru
[Download RAW message or body]

Hannes,

>btw, I've also fixed an 'interesting' use of strchrnul:
>
>			(*vp->func)(strchrnul(s, '=') + 1);
>
>I.e. if 's' does not contain the character '=', the argument to the 
>function will be a pointer to 's + strlen(s) + 1'. Uh-oh.

Yes. But ash don`t have error.
vartable have two format: "VAR=" or "VAR\0".
Last string (undefault variable) have double zero.
And 's + strlen(s) + 1' pointer setted to last zero.


--w
vodz



_______________________________________________
busybox mailing list
busybox@mail.busybox.net
http://codepoet.org/mailman/listinfo/busybox


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic