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

Diff for /src/usr.bin/ssh/sshbuf.c between version 1.15 and 1.16

version 1.15, 2020/02/26 13:40:09 version 1.16, 2022/04/08 04:40:40
Line 107 
Line 107 
         if ((r = sshbuf_check_sanity(child)) != 0 ||          if ((r = sshbuf_check_sanity(child)) != 0 ||
             (r = sshbuf_check_sanity(parent)) != 0)              (r = sshbuf_check_sanity(parent)) != 0)
                 return r;                  return r;
           if (child->parent != NULL && child->parent != parent)
                   return SSH_ERR_INTERNAL_ERROR;
         child->parent = parent;          child->parent = parent;
         child->parent->refcount++;          child->parent->refcount++;
         return 0;          return 0;
Line 175 
Line 177 
                 buf->off = buf->size;                  buf->off = buf->size;
                 return;                  return;
         }          }
         (void) sshbuf_check_sanity(buf);          if (sshbuf_check_sanity(buf) != 0)
                   return;
         buf->off = buf->size = 0;          buf->off = buf->size = 0;
         if (buf->alloc != SSHBUF_SIZE_INIT) {          if (buf->alloc != SSHBUF_SIZE_INIT) {
                 if ((d = recallocarray(buf->d, buf->alloc, SSHBUF_SIZE_INIT,                  if ((d = recallocarray(buf->d, buf->alloc, SSHBUF_SIZE_INIT,
Line 184 
Line 187 
                         buf->alloc = SSHBUF_SIZE_INIT;                          buf->alloc = SSHBUF_SIZE_INIT;
                 }                  }
         }          }
         explicit_bzero(buf->d, SSHBUF_SIZE_INIT);          explicit_bzero(buf->d, buf->alloc);
 }  }
   
 size_t  size_t

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16