(/home/sate/Testcases/c/cve/wireshark-1.2.0/wiretap/cosine.c) |
| |
| 504 | | | parse_single_hex_dump_line(char* rec, guint8 *buf, guint byte_offset) |
| 505 | | | { |
| 506 | | | int num_items_scanned, i; |
| 507 | | | unsigned int bytes[16]; |
| 508 | | | |
| 509 | | | num_items_scanned = sscanf(rec, "%02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x", |
| 510 | | | &bytes[0], &bytes[1], &bytes[2], &bytes[3], |
| 511 | | | &bytes[4], &bytes[5], &bytes[6], &bytes[7], |
| 512 | | | &bytes[8], &bytes[9], &bytes[10], &bytes[11], |
| 513 | | | &bytes[12], &bytes[13], &bytes[14], &bytes[15]); |
| 514 | | | if (num_items_scanned == 0) |
| 515 | | | return -1; |
| 516 | | | |
| 517 | | | if (num_items_scanned > 16) |
| 518 | | | num_items_scanned = 16; |
Unreachable Data Flow
The highlighted code will not execute under any circumstances. This may be because of: |
|
| 519 | | | |
| 520 | | | for (i=0; i<num_items_scanned; i++) { |
| 521 | | | buf[byte_offset + i] = (guint8)bytes[i]; |
| 522 | | | } |
| 523 | | | |
| 524 | | | return num_items_scanned; |
| 525 | | | } |
| |