Text   |  XML   |  ReML   |   Visible Warnings:

Unreachable Call  at tvbuff.c:828

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

composite_ensure_contiguous_no_exception

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/tvbuff.c)expand/collapse
Show more  
 788  static const guint8*
 789  composite_ensure_contiguous_no_exception(tvbuff_t *tvb, guint abs_offset,
 790                  guint abs_length)
 791  {
 792          guint           i, num_members;
 793          tvb_comp_t      *composite;
 794          tvbuff_t        *member_tvb = NULL;
 795          guint           member_offset, member_length;
 796          GSList          *slist;
 797   
 798          DISSECTOR_ASSERT(tvb->type == TVBUFF_COMPOSITE);
 799   
 800          /* Maybe the range specified by offset/length
 801           * is contiguous inside one of the member tvbuffs */
 802          composite = &tvb->tvbuffs.composite;
 803          num_members = g_slist_length(composite->tvbs);
 804   
 805          for (i = 0; i < num_members; i++) {
 806                  if (abs_offset <= composite->end_offsets[i]) {
 807                          slist = g_slist_nth(composite->tvbs, i);
 808                          member_tvb = slist->data;
 809                          break;
 810                  }
 811          }
 812          DISSECTOR_ASSERT(member_tvb);
 813   
 814          if (check_offset_length_no_exception(member_tvb, abs_offset - composite->start_offsets[i],
 815                                  abs_length, &member_offset, &member_length, NULL)) {
 816   
 817                  /*
 818                   * The range is, in fact, contiguous within member_tvb.
 819                   */
 820                  DISSECTOR_ASSERT(!tvb->real_data);
 821                  return ensure_contiguous_no_exception(member_tvb, member_offset, member_length, NULL);
 822          }
 823          else {
 824                  tvb->real_data = tvb_memdup(tvb, 0, -1);
 825                  return tvb->real_data + abs_offset;
 826          }
 827   
 828          DISSECTOR_ASSERT_NOT_REACHED();
 829          return NULL;
 830  }
Show more  




Change Warning 1124.30831 : Unreachable Call

Priority:
State:
Finding:
Owner:
Note: