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

Diff for /src/usr.bin/ssh/readpass.c between version 1.49 and 1.50

version 1.49, 2013/05/17 00:13:14 version 1.50, 2014/02/02 03:44:31
Line 96 
Line 96 
                         break;                          break;
         signal(SIGCHLD, osigchld);          signal(SIGCHLD, osigchld);
         if (ret == -1 || !WIFEXITED(status) || WEXITSTATUS(status) != 0) {          if (ret == -1 || !WIFEXITED(status) || WEXITSTATUS(status) != 0) {
                 memset(buf, 0, sizeof(buf));                  explicit_bzero(buf, sizeof(buf));
                 return NULL;                  return NULL;
         }          }
   
         buf[strcspn(buf, "\r\n")] = '\0';          buf[strcspn(buf, "\r\n")] = '\0';
         pass = xstrdup(buf);          pass = xstrdup(buf);
         memset(buf, 0, sizeof(buf));          explicit_bzero(buf, sizeof(buf));
         return pass;          return pass;
 }  }
   
Line 159 
Line 159 
         }          }
   
         ret = xstrdup(buf);          ret = xstrdup(buf);
         memset(buf, 'x', sizeof buf);          explicit_bzero(buf, sizeof(buf));
         return ret;          return ret;
 }  }
   

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