Print this page
4853 illumos-gate is not lint-clean when built with openssl 1.0

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/openssl/libsunw_ssl/d1_both.c
          +++ new/usr/src/lib/openssl/libsunw_ssl/d1_both.c
↓ open down ↓ 600 lines elided ↑ open up ↑
 601  601  static int
 602  602  dtls1_reassemble_fragment(SSL *s, const struct hm_header_st* msg_hdr, int *ok)
 603  603          {
 604  604          hm_fragment *frag = NULL;
 605  605          pitem *item = NULL;
 606  606          int i = -1, is_complete;
 607  607          unsigned char seq64be[8];
 608  608          unsigned long frag_len = msg_hdr->frag_len;
 609  609  
 610  610          if ((msg_hdr->frag_off+frag_len) > msg_hdr->msg_len ||
 611      -            msg_hdr->msg_len > dtls1_max_handshake_message_len(s))
      611 +                msg_hdr->msg_len > dtls1_max_handshake_message_len(s))
 612  612                  goto err;
 613  613  
 614  614          if (frag_len == 0)
 615  615                  return DTLS1_HM_FRAGMENT_RETRY;
 616  616  
 617  617          /* Try to find item in queue */
 618  618          memset(seq64be,0,sizeof(seq64be));
 619  619          seq64be[6] = (unsigned char) (msg_hdr->seq>>8);
 620  620          seq64be[7] = (unsigned char) msg_hdr->seq;
 621  621          item = pqueue_find(s->d1->buffered_messages, seq64be);
↓ open down ↓ 11 lines elided ↑ open up ↑
 633  633                  {
 634  634                  frag = (hm_fragment*) item->data;
 635  635                  if (frag->msg_header.msg_len != msg_hdr->msg_len)
 636  636                          {
 637  637                          item = NULL;
 638  638                          frag = NULL;
 639  639                          goto err;
 640  640                          }
 641  641                  }
 642  642  
 643      -
 644  643          /* If message is already reassembled, this must be a
 645  644           * retransmit and can be dropped. In this case item != NULL and so frag
 646  645           * does not need to be freed.
 647  646           */
 648  647          if (frag->reassembly == NULL)
 649  648                  {
 650  649                  unsigned char devnull [256];
 651  650  
 652  651                  while (frag_len)
 653  652                          {
↓ open down ↓ 109 lines elided ↑ open up ↑
 763  762                          goto err;
 764  763  
 765  764                  memcpy(&(frag->msg_header), msg_hdr, sizeof(*msg_hdr));
 766  765  
 767  766                  if (frag_len)
 768  767                          {
 769  768                          /* read the body of the fragment (header has already been read */
 770  769                          i = s->method->ssl_read_bytes(s,SSL3_RT_HANDSHAKE,
 771  770                                  frag->fragment,frag_len,0);
 772  771                          if ((unsigned long)i!=frag_len)
 773      -                                i = -1;
      772 +                                i=-1;
 774  773                          if (i<=0)
 775  774                                  goto err;
 776  775                          }
 777  776  
 778  777                  item = pitem_new(seq64be, frag);
 779  778                  if ( item == NULL)
 780  779                          goto err;
 781  780  
 782  781                  item = pqueue_insert(s->d1->buffered_messages, item);
 783  782                  /* pqueue_insert fails iff a duplicate item is inserted.
↓ open down ↓ 850 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX