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

Diff for /src/usr.bin/ssh/Attic/key.c between version 1.47 and 1.48

version 1.47, 2002/07/04 04:15:33 version 1.48, 2002/07/04 10:41:47
Line 729 
Line 729 
 {  {
         Buffer b;          Buffer b;
         int len;          int len;
         u_char *buf;  
   
         if (key == NULL) {          if (key == NULL) {
                 error("key_to_blob: key == NULL");                  error("key_to_blob: key == NULL");
Line 755 
Line 754 
                 return 0;                  return 0;
         }          }
         len = buffer_len(&b);          len = buffer_len(&b);
         buf = xmalloc(len);  
         memcpy(buf, buffer_ptr(&b), len);  
         memset(buffer_ptr(&b), 0, len);  
         buffer_free(&b);  
         if (lenp != NULL)          if (lenp != NULL)
                 *lenp = len;                  *lenp = len;
         if (blobp != NULL)          if (blobp != NULL) {
                 *blobp = buf;                  *blobp = xmalloc(len);
         else                  memcpy(*blobp, buffer_ptr(&b), len);
                 xfree(buf);          }
           memset(buffer_ptr(&b), 0, len);
           buffer_free(&b);
         return len;          return len;
 }  }
   

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