[BACK]Return to tmux.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/tmux.c between version 1.112 and 1.113

version 1.112, 2012/07/10 11:53:01 version 1.113, 2012/11/26 11:35:28
Line 159 
Line 159 
 char *  char *
 makesocketpath(const char *label)  makesocketpath(const char *label)
 {  {
         char            base[MAXPATHLEN], *path, *s;          char            base[MAXPATHLEN], realbase[MAXPATHLEN], *path, *s;
         struct stat     sb;          struct stat     sb;
         u_int           uid;          u_int           uid;
   
Line 183 
Line 183 
                 return (NULL);                  return (NULL);
         }          }
   
         xasprintf(&path, "%s/%s", base, label);          if (realpath(base, realbase) == NULL)
                   strlcpy(realbase, base, sizeof realbase);
   
           xasprintf(&path, "%s/%s", realbase, label);
         return (path);          return (path);
 }  }
   
Line 384 
Line 387 
                 }                  }
         }          }
         free(label);          free(label);
         if (realpath(path, socket_path) == NULL)          strlcpy(socket_path, path, sizeof socket_path);
                 strlcpy(socket_path, path, sizeof socket_path);  
         free(path);          free(path);
   
         /* Set process title. */          /* Set process title. */

Legend:
Removed from v.1.112  
changed lines
  Added in v.1.113