1
0

patch-openbsd-compat_port-tun_c 723 B

123456789101112131415161718192021
  1. $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  2. --- openssh-5.2p1.orig/openbsd-compat/port-tun.c 2008-05-19 07:28:36.000000000 +0200
  3. +++ openssh-5.2p1/openbsd-compat/port-tun.c 2009-09-18 12:25:49.000000000 +0200
  4. @@ -67,7 +67,7 @@ sys_tun_open(int tun, int mode)
  5. return (-1);
  6. }
  7. - bzero(&ifr, sizeof(ifr));
  8. + memset(&ifr, 0, sizeof(ifr));
  9. if (mode == SSH_TUNMODE_ETHERNET) {
  10. ifr.ifr_flags = IFF_TAP;
  11. @@ -213,7 +213,7 @@ sys_tun_infilter(struct Channel *c, char
  12. if (len <= 0 || len > (int)(sizeof(rbuf) - sizeof(*af)))
  13. return (-1);
  14. ptr = (char *)&rbuf[0];
  15. - bcopy(buf, ptr + sizeof(u_int32_t), len);
  16. + memcpy(ptr + sizeof(u_int32_t), buf, len);
  17. len += sizeof(u_int32_t);
  18. af = (u_int32_t *)ptr;