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

Diff for /src/usr.bin/ssh/misc.c between version 1.48 and 1.49

version 1.48, 2006/03/20 17:10:19 version 1.49, 2006/03/25 00:05:41
Line 170 
Line 170 
 struct passwd *  struct passwd *
 pwcopy(struct passwd *pw)  pwcopy(struct passwd *pw)
 {  {
         struct passwd *copy = xmalloc(sizeof(*copy));          struct passwd *copy = xcalloc(1, sizeof(*copy));
   
         memset(copy, 0, sizeof(*copy));  
         copy->pw_name = xstrdup(pw->pw_name);          copy->pw_name = xstrdup(pw->pw_name);
         copy->pw_passwd = xstrdup(pw->pw_passwd);          copy->pw_passwd = xstrdup(pw->pw_passwd);
         copy->pw_gecos = xstrdup(pw->pw_gecos);          copy->pw_gecos = xstrdup(pw->pw_gecos);
Line 682 
Line 681 
         u_int i, hl;          u_int i, hl;
   
         hl = l * 2 + 1;          hl = l * 2 + 1;
         r = xmalloc(hl);          r = xcalloc(1, hl);
         *r = '\0';  
         for (i = 0; i < l; i++) {          for (i = 0; i < l; i++) {
                 snprintf(b, sizeof(b), "%02x", d[i]);                  snprintf(b, sizeof(b), "%02x", d[i]);
                 strlcat(r, b, hl);                  strlcat(r, b, hl);

Legend:
Removed from v.1.48  
changed lines
  Added in v.1.49