Text   |  XML   |  ReML   |   Visible Warnings:

Unreachable Computation  at tvbuff.c:1839

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

tvb_pbrk_guint8

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/tvbuff.c)expand/collapse
Show more  
 1787  tvb_pbrk_guint8(tvbuff_t *tvb, gint offset, gint maxlength, const guint8 *needles)
 1788  {
 1789          const guint8    *result;
 1790          guint           abs_offset, junk_length;
 1791          guint           tvbufflen;
 1792          guint           limit;
 1793   
 1794          check_offset_length(tvb, offset, 0, &abs_offset, &junk_length);
 1795   
 1796          /* Only search to end of tvbuff, w/o throwing exception. */
 1797          tvbufflen = tvb_length_remaining(tvb, abs_offset);
 1798          if (maxlength == -1) {
 1799                  /* No maximum length specified; search to end of tvbuff. */
 1800                  limit = tvbufflen;
 1801          }
 1802          else if (tvbufflen < (guint) maxlength) {
 1803                  /* Maximum length goes past end of tvbuff; search to end 
 1804                     of tvbuff. */
 1805                  limit = tvbufflen;
 1806          }
 1807          else {
 1808                  /* Maximum length doesn't go past end of tvbuff; search 
 1809                     to that value. */
 1810                  limit = maxlength;
 1811          }
 1812   
 1813          /* If we have real data, perform our search now. */
 1814          if (tvb->real_data) {
 1815                  result = guint8_pbrk(tvb->real_data + abs_offset, limit, needles);
 1816                  if (result == NULL) {
 1817                          return -1;
 1818                  }
 1819                  else {
 1820                          return (gint) (result - tvb->real_data);
 1821                  }
 1822          }
 1823   
 1824          switch(tvb->type) {
 1825                  case TVBUFF_REAL_DATA:
 1826                          DISSECTOR_ASSERT_NOT_REACHED();
 1827   
 1828                  case TVBUFF_SUBSET:
 1829                          return tvb_pbrk_guint8(tvb->tvbuffs.subset.tvb,
 1830                                          abs_offset - tvb->tvbuffs.subset.offset,
 1831                                          limit, needles);
 1832   
 1833                  case TVBUFF_COMPOSITE:
 1834                          DISSECTOR_ASSERT_NOT_REACHED();
 1835                          /* XXX - return composite_pbrk_guint8(tvb, offset, limit, needle); */
 1836          }
 1837   
 1838          DISSECTOR_ASSERT_NOT_REACHED();
 1839          return -1;
 1840  }
Show more  




Change Warning 1803.30753 : Unreachable Computation

Priority:
State:
Finding:
Owner:
Note: