Diff for /embedaddon/rsync/syscall.c between versions 1.1.1.2 and 1.1.1.3

version 1.1.1.2, 2013/10/14 07:51:14 version 1.1.1.3, 2016/11/01 09:54:32
Line 4 Line 4
  *   *
  * Copyright (C) 1998 Andrew Tridgell   * Copyright (C) 1998 Andrew Tridgell
  * Copyright (C) 2002 Martin Pool   * Copyright (C) 2002 Martin Pool
 * Copyright (C) 2003-2013 Wayne Davison * Copyright (C) 2003-2015 Wayne Davison
  *   *
  * This program is free software; you can redistribute it and/or modify   * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by   * it under the terms of the GNU General Public License as published by
Line 147  int do_mknod(const char *pathname, mode_t mode, dev_t  Line 147  int do_mknod(const char *pathname, mode_t mode, dev_t 
         if (S_ISSOCK(mode)) {          if (S_ISSOCK(mode)) {
                 int sock;                  int sock;
                 struct sockaddr_un saddr;                  struct sockaddr_un saddr;
                   unsigned int len = strlcpy(saddr.sun_path, pathname, sizeof saddr.sun_path);
                   if (len >= sizeof saddr.sun_path) {
                           errno = ENAMETOOLONG;
                           return -1;
                   }
 #ifdef HAVE_SOCKADDR_UN_LEN  #ifdef HAVE_SOCKADDR_UN_LEN
                unsigned int len =                saddr.sun_len = len + 1;
#endif 
                    strlcpy(saddr.sun_path, pathname, sizeof saddr.sun_path); 
#ifdef HAVE_SOCKADDR_UN_LEN 
                saddr.sun_len = len >= sizeof saddr.sun_path 
                              ? sizeof saddr.sun_path : len + 1; 
 #endif  #endif
                 saddr.sun_family = AF_UNIX;                  saddr.sun_family = AF_UNIX;
   

Removed from v.1.1.1.2  
changed lines
  Added in v.1.1.1.3


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>