qi: Make is_readable() function more flatter
[dragora.git] / patches / tcp_wrappers / tcp-wrappers-7.6-redhat-bug11881.patch
blob4a6847621c57d5afb92685120839e6f35e424a04
1 --- tcp_wrappers_7.6/tcpd.c.bug11881
2 +++ tcp_wrappers_7.6/tcpd.c
3 @@ -60,10 +60,10 @@
4 */
6 if (argv[0][0] == '/') {
7 - strcpy(path, argv[0]);
8 + strncpy(path, argv[0], sizeof(path));
9 argv[0] = strrchr(argv[0], '/') + 1;
10 } else {
11 - sprintf(path, "%s/%s", REAL_DAEMON_DIR, argv[0]);
12 + snprintf(path, sizeof(path), "%s/%s", REAL_DAEMON_DIR, argv[0]);
16 --- tcp_wrappers_7.6/eval.c.bug11881
17 +++ tcp_wrappers_7.6/eval.c
18 @@ -111,7 +111,7 @@
19 return (hostinfo);
20 #endif
21 if (STR_NE(eval_user(request), unknown)) {
22 - sprintf(both, "%s@%s", request->user, hostinfo);
23 + snprintf(both, sizeof(both), "%s@%s", request->user, hostinfo);
24 return (both);
25 } else {
26 return (hostinfo);
27 @@ -128,7 +128,7 @@
28 char *daemon = eval_daemon(request);
30 if (STR_NE(host, unknown)) {
31 - sprintf(both, "%s@%s", daemon, host);
32 + snprintf(both, sizeof(both), "%s@%s", daemon, host);
33 return (both);
34 } else {
35 return (daemon);