]> git.pld-linux.org Git - packages/tcp_wrappers.git/blob - tcp_wrappers-bug11881.patch
- rediffed
[packages/tcp_wrappers.git] / tcp_wrappers-bug11881.patch
1 --- tcp_wrappers_7.6/tcpd.c.bug11881    Thu Jul 27 15:39:27 2000
2 +++ tcp_wrappers_7.6/tcpd.c     Thu Jul 27 15:41:54 2000
3 @@ -60,10 +60,10 @@
4       */
5  
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]);
13      }
14  
15      /*
16 --- tcp_wrappers_7.6/eval.c.bug11881    Thu Jul 27 15:39:53 2000
17 +++ tcp_wrappers_7.6/eval.c     Thu Jul 27 15:40:51 2000
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);
29  
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);
This page took 0.080532 seconds and 3 git commands to generate.