提交 045d32a8 编写于 作者: D Daniel P. Berrange

Fix off-by-one in SSH argv checking. Fix format string warning

上级 32d4aeb1
Mon Jan 15 09:18:53 EST 2008 Daniel P. Berrange <berrange@redhat.com>
* src/remote_internal.c: Fix off by one in checking SSH
argv for NULL. Fix format args in error message to avoid
compile warning.
2008-01-14 Jim Meyering <meyering@redhat.com>
Update files from gnulib.
......
......@@ -670,11 +670,12 @@ doRemoteOpen (virConnectPtr conn,
cmd_argv[j++] = strdup (sockname ? sockname : LIBVIRTD_PRIV_UNIX_SOCKET);
cmd_argv[j++] = 0;
assert (j == nr_args);
for (j = 0; j < nr_args; j++)
for (j = 0; j < (nr_args-1); j++) {
if (cmd_argv[j] == NULL) {
error (conn, VIR_ERR_SYSTEM_ERROR, strerror (ENOMEM));
goto failed;
}
}
}
/*FALLTHROUGH*/
......@@ -3177,7 +3178,7 @@ remoteAuthSASL (virConnectPtr conn, struct private_data *priv, int in_open,
}
__virRaiseError (in_open ? NULL : conn, NULL, NULL, VIR_FROM_REMOTE,
VIR_ERR_AUTH_FAILED, VIR_ERR_ERROR, NULL, NULL, NULL,
0, 0, msg);
0, 0, "%s", msg);
goto cleanup;
}
free(iret.mechlist);
......@@ -3253,7 +3254,7 @@ remoteAuthSASL (virConnectPtr conn, struct private_data *priv, int in_open,
}
__virRaiseError (in_open ? NULL : conn, NULL, NULL, VIR_FROM_REMOTE,
VIR_ERR_AUTH_FAILED, VIR_ERR_ERROR, NULL, NULL, NULL,
0, 0, msg);
0, 0, "%s", msg);
goto cleanup;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册