DragonFly bugs List (threaded) for 2009-04
DragonFly BSD
DragonFly bugs List (threaded) for 2009-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

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


From: "Stathis Kamperis \(via DragonFly issue tracker\)" <sinknull@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 20 Apr 2009 18:58:16 +0000

Stathis Kamperis <ekamperi@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.

Cheers,
Stathis

_____________________________________________________
DragonFly issue tracker <bugs@lists.dragonflybsd.org>
<http://bugs.dragonflybsd.org/issue1341>
_____________________________________________________

Attachment: printenv.diff
Description: Binary data



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]