2012-04-22 04:21:26 +02:00
|
|
|
--- eval.c.orig
|
2008-10-13 18:39:38 +02:00
|
|
|
+++ eval.c
|
2012-04-22 04:21:26 +02:00
|
|
|
@@ -111,7 +111,7 @@ struct request_info *request;
|
2008-10-13 18:39:38 +02:00
|
|
|
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);
|
2012-04-22 04:21:26 +02:00
|
|
|
@@ -128,7 +128,7 @@ struct request_info *request;
|
2008-10-13 18:39:38 +02:00
|
|
|
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);
|
2012-04-22 04:21:26 +02:00
|
|
|
--- tcpd.c.orig
|
2008-10-13 18:39:38 +02:00
|
|
|
+++ tcpd.c
|
2012-04-22 04:21:26 +02:00
|
|
|
@@ -61,10 +61,10 @@ char **argv;
|
2008-10-13 18:39:38 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
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]);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|