sbase

suckless unix tools
git clone git://git.2f30.org/sbase
Log | Files | Refs | README | LICENSE

commit cd194d96ad543782599b4f7f2a4fb997484cf963
parent 1d5663672e918b6935813f254f813eb96cb40589
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Fri, 18 Apr 2014 19:46:02 +0200

chown: fix out-of-bounds ((null) bad address error)

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>

Diffstat:
Mchown.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/chown.c b/chown.c @@ -32,11 +32,13 @@ main(int argc, char *argv[]) default: usage(); } ARGEND; + if(argc == 0) usage(); owner = argv[0]; argv++; + argc--; if((group = strchr(owner, ':'))) *group++ = '\0';