Text   |  XML   |  ReML   |   Visible Warnings:

Cast Alters Value  at toshiba.c:471

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/toshiba.c)expand/collapse
Show more  
 438  parse_single_hex_dump_line(char* rec, guint8 *buf, guint byte_offset) {
 439   
 440          int             pos, i;
 441          char            *s;
 442          unsigned long   value;
 443          guint16         word_value;
 444   
 445          /* Get the byte_offset directly from the record */
 446          rec[4] = '\0';
 447          s = rec;
 448          value = strtoul(s, NULL, 16);
 449   
 450          if (value != byte_offset) {
 451                  return FALSE;
 452          }
 453   
 454          /* Go through the substring representing the values and:
 455           *      1. Replace any spaces with '0's
 456           *      2. Place \0's every 5 bytes (to terminate the string)
 457           *
 458           * Then read the eight sets of hex bytes
 459           */
 460   
 461          for (pos = START_POS; pos < START_POS + HEX_LENGTH; pos++) {
 462                  if (rec[pos] == ' ') {
 463                          rec[pos] = '0';
 464                  }
 465          }
 466   
 467          pos = START_POS;
 468          for (i = 0; i < 8; i++) {
 469                  rec[pos+4] = '\0';
 470   
 471                  word_value = (guint16) strtoul(&rec[pos], NULL, 16);
Show more  




Change Warning 1054.29787 : Cast Alters Value

Priority:
State:
Finding:
Owner:
Note: