1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

Fix off-by-one bugs in subcommand argument passing.

(This used to be commit d85a2782a483e563a8b68924d4897a145bc25896)
This commit is contained in:
Tim Potter 2008-02-18 10:24:51 +11:00 committed by Günther Deschner
parent a8fbb92146
commit 9053bdf57c

View File

@ -1044,8 +1044,8 @@ static NTSTATUS cmd_samr_enum_domains(struct rpc_pipe_client *cli,
return NT_STATUS_OK;
}
if (argc > 2) {
sscanf(argv[2], "%x", &access_mask);
if (argc > 1) {
sscanf(argv[1], "%x", &access_mask);
}
/* Get sam policy handle */
@ -1194,11 +1194,11 @@ static NTSTATUS cmd_samr_query_aliasinfo(struct rpc_pipe_client *cli,
sscanf(argv[2], "%i", &alias_rid);
if (argc > 3) {
if (argc > 2) {
level = atoi(argv[3]);
}
if (argc > 4) {
if (argc > 3) {
sscanf(argv[4], "%x", &access_mask);
}