Text   |  XML   |  ReML   |   Visible Warnings:

Cast Alters Value  at vms.c:543

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

parse_single_hex_dump_line

(/home/sate/Testcases/c/cve/wireshark-1.2.0/wiretap/vms.c)expand/collapse
Show more  
 514  parse_single_hex_dump_line(char* rec, guint8 *buf, long byte_offset,
 515                 int in_off, int remaining) {
 516   
 517      int        i;
 518      char        *s;
 519      int        value;
 520      static const int offsets[16] = {39,37,35,33,28,26,24,22,17,15,13,11,6,4,2,0};
 521      char lbuf[3] = {0,0,0};
 522   
 523   
 524      /* Get the byte_offset directly from the record */
 525      s = rec;
 526      value = (int)strtoul(s + 45 + in_off, NULL, 16);    /* XXX - error check? */
 527   
 528      if (value != byte_offset) {
 529          return FALSE;
 530      }
 531   
 532      if (remaining > 16)
 533          remaining = 16;
 534   
 535      /* Read the octets right to left, as that is how they are displayed 
 536       * in VMS.
 537       */
 538   
 539      for (i = 0; i < remaining; i++) {
 540          lbuf[0] = rec[offsets[i] + in_off];
 541          lbuf[1] = rec[offsets[i] + 1 + in_off];
 542   
 543          buf[byte_offset + i] = (guint8) strtoul(lbuf, NULL, 16);
Show more  




Change Warning 1063.29788 : Cast Alters Value

Priority:
State:
Finding:
Owner:
Note: