[issue1341] printenv(1): don't allow '=' in name

Stathis Kamperis (via DragonFly issue tracker) sinknull at crater.dragonflybsd.org
Mon Apr 20 12:00:05 PDT 2009

Stathis Kamperis <ekamperi at gmail.com> added the comment:

: It sounds to me that printenv's environment search is what needs to
: be fixed.  The environ has one environment variable per array entry.
: instead of doing the memcmp() it should iterate forwards looking for
: the first '=', then do a length check and, if the length matches,
: finally a memcmp().

They way you put it, seems more reasonable to me.
I attached a new diff.


DragonFly issue tracker <bugs at lists.dragonflybsd.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bin00002.bin
Type: application/octet-stream
Size: 563 bytes
Desc: "Description: Binary data"
URL: <http://lists.dragonflybsd.org/pipermail/bugs/attachments/20090420/e504a98c/attachment-0020.bin>

More information about the Bugs mailing list