commit | 45749fce969c06556fce0e061f3156e5e352996d | [log] [tgz] |
---|---|---|
author | Barret Rhoden <brho@cs.berkeley.edu> | Fri Mar 06 10:00:20 2015 -0500 |
committer | Barret Rhoden <brho@cs.berkeley.edu> | Fri Mar 06 10:00:20 2015 -0500 |
tree | fc50075cbfeb9f0ba7cb7af0bab05514e6a0feaa | |
parent | 0d140d5b8e17951f9732dd05d1f483e910db20b1 [diff] |
Fixes unchecked results from parsecmd Before accessing the strings of a parsecmd, we must check the nf (num fields). Many devices were not checking, so something like echo "" > /net/ether0/stats Would trigger a PF. Using lookupcmd() is safe, since it check the nf internally. But any naked access to the fields (like with strcmp) requires a check.