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

Diff for /src/usr.bin/ssh/sshkey.c between version 1.38 and 1.39

version 1.38, 2016/09/12 23:31:27 version 1.39, 2016/09/26 21:16:11
Line 861 
Line 861 
                 int nlen = BN_num_bytes(k->rsa->n);                  int nlen = BN_num_bytes(k->rsa->n);
                 int elen = BN_num_bytes(k->rsa->e);                  int elen = BN_num_bytes(k->rsa->e);
   
                   if (nlen < 0 || elen < 0 || nlen >= INT_MAX - elen) {
                           r = SSH_ERR_INVALID_FORMAT;
                           goto out;
                   }
                 blob_len = nlen + elen;                  blob_len = nlen + elen;
                 if (nlen >= INT_MAX - elen ||                  if ((blob = malloc(blob_len)) == NULL) {
                     (blob = malloc(blob_len)) == NULL) {  
                         r = SSH_ERR_ALLOC_FAIL;                          r = SSH_ERR_ALLOC_FAIL;
                         goto out;                          goto out;
                 }                  }

Legend:
Removed from v.1.38  
changed lines
  Added in v.1.39