mount.cifs: fix argument count check
authorJeff Layton <jlayton@samba.org>
Fri, 9 Nov 2012 11:08:38 +0000 (06:08 -0500)
committerJeff Layton <jlayton@samba.org>
Fri, 9 Nov 2012 11:08:38 +0000 (06:08 -0500)
commitfeab5b327c5fea393d626f0ae3c33810fdafe518
treec3a69af14c51b9333e9c2213ff4eab0540f35794
parentfd3d58c4e78098700a03551c7e7d2f2b63777502
mount.cifs: fix argument count check

The argv < 3 check could return true if you pass in some option flags.
If you don't provide any further arguments then you might just walk
off the end of the argv array. The values past the end aren't
guaranteed to be NULL in that case.

Fix the check to just look at whether there are 2 more arguments after
the getopt processing is done.

Signed-off-by: Jeff Layton <jlayton@samba.org>
mount.cifs.c