Text   |  XML   |  ReML   |   Visible Warnings:

Unreachable Computation  at tvbuff.c:1776

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

tvb_find_guint8

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/tvbuff.c)expand/collapse
Show more  
 1724  tvb_find_guint8(tvbuff_t *tvb, gint offset, gint maxlength, guint8 needle)
 1725  {
 1726          const guint8    *result;
 1727          guint           abs_offset, junk_length;
 1728          guint           tvbufflen;
 1729          guint           limit;
 1730   
 1731          check_offset_length(tvb, offset, 0, &abs_offset, &junk_length);
 1732   
 1733          /* Only search to end of tvbuff, w/o throwing exception. */
 1734          tvbufflen = tvb_length_remaining(tvb, abs_offset);
 1735          if (maxlength == -1) {
 1736                  /* No maximum length specified; search to end of tvbuff. */
 1737                  limit = tvbufflen;
 1738          }
 1739          else if (tvbufflen < (guint) maxlength) {
 1740                  /* Maximum length goes past end of tvbuff; search to end 
 1741                     of tvbuff. */
 1742                  limit = tvbufflen;
 1743          }
 1744          else {
 1745                  /* Maximum length doesn't go past end of tvbuff; search 
 1746                     to that value. */
 1747                  limit = maxlength;
 1748          }
 1749   
 1750          /* If we have real data, perform our search now. */
 1751          if (tvb->real_data) {
 1752                  result = guint8_find(tvb->real_data + abs_offset, limit, needle);
 1753                  if (result == NULL) {
 1754                          return -1;
 1755                  }
 1756                  else {
 1757                          return (gint) (result - tvb->real_data);
 1758                  }
 1759          }
 1760   
 1761          switch(tvb->type) {
 1762                  case TVBUFF_REAL_DATA:
 1763                          DISSECTOR_ASSERT_NOT_REACHED();
 1764   
 1765                  case TVBUFF_SUBSET:
 1766                          return tvb_find_guint8(tvb->tvbuffs.subset.tvb,
 1767                                          abs_offset - tvb->tvbuffs.subset.offset,
 1768                                          limit, needle);
 1769   
 1770                  case TVBUFF_COMPOSITE:
 1771                          DISSECTOR_ASSERT_NOT_REACHED();
 1772                          /* XXX - return composite_find_guint8(tvb, offset, limit, needle); */
 1773          }
 1774   
 1775          DISSECTOR_ASSERT_NOT_REACHED();
 1776          return -1;
 1777  }
Show more  




Change Warning 1202.30747 : Unreachable Computation

Priority:
State:
Finding:
Owner:
Note: