代码拉取完成,页面将自动刷新
diff -up tcp_wrappers_7.6/eval.c.patch4 tcp_wrappers_7.6/eval.c
--- tcp_wrappers_7.6/eval.c.patch4 1995-01-30 19:51:46.000000000 +0100
+++ tcp_wrappers_7.6/eval.c 2008-08-29 09:45:12.000000000 +0200
@@ -111,7 +111,7 @@ struct request_info *request;
return (hostinfo);
#endif
if (STR_NE(eval_user(request), unknown)) {
- sprintf(both, "%s@%s", request->user, hostinfo);
+ snprintf(both, sizeof(both), "%s@%s", request->user, hostinfo);
return (both);
} else {
return (hostinfo);
@@ -128,7 +128,7 @@ struct request_info *request;
char *daemon = eval_daemon(request);
if (STR_NE(host, unknown)) {
- sprintf(both, "%s@%s", daemon, host);
+ snprintf(both, sizeof(both), "%s@%s", daemon, host);
return (both);
} else {
return (daemon);
diff -up tcp_wrappers_7.6/tcpd.c.patch4 tcp_wrappers_7.6/tcpd.c
--- tcp_wrappers_7.6/tcpd.c.patch4 1996-02-11 17:01:33.000000000 +0100
+++ tcp_wrappers_7.6/tcpd.c 2008-08-29 09:45:12.000000000 +0200
@@ -60,10 +60,10 @@ char **argv;
*/
if (argv[0][0] == '/') {
- strcpy(path, argv[0]);
+ strncpy(path, argv[0], sizeof(path));
argv[0] = strrchr(argv[0], '/') + 1;
} else {
- sprintf(path, "%s/%s", REAL_DAEMON_DIR, argv[0]);
+ snprintf(path, sizeof(path), "%s/%s", REAL_DAEMON_DIR, argv[0]);
}
/*
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。