(/home/sate/Testcases/c/cve/wireshark-1.2.0/wiretap/airopeek9.c) |
| |
| 562 | | | airopeekv9_seek_read(wtap *wth, gint64 seek_off, |
| 563 | | | union *, guchar *pd, int length, |
| 564 | | | int *err, gchar **err_info) |
| 565 | | | { |
| 566 | | | hdr_info_t hdr_info; |
| 567 | | | |
| 568 | | | if (file_seek(wth->random_fh, seek_off, SEEK_SET, err) == -1)
x /usr/include/stdio.h |
| |
141 | #define SEEK_SET 0 /* Seek from beginning of file. */ |
| |
|
| 569 | | | return FALSE; |
| 570 | | | |
| 571 | | | |
| 572 | | | if ((wth->random_fh, &hdr_info, err, err_info) == -1) |
| 573 | | | return FALSE; |
Unreachable Data Flow
The highlighted code will not execute under any circumstances. This may be because of: |
|
| 574 | | | |
| 575 | | | switch (wth->file_encap) { |
| 576 | | | |
| 577 | | | case WTAP_ENCAP_IEEE_802_11_WITH_RADIO: |
| 578 | | | ->ieee_802_11 = hdr_info.ieee_802_11; |
| 579 | | | if (wth->capture.airopeek9->has_fcs) |
| 580 | | | ->ieee_802_11.fcs_len = 4; |
| 581 | | | else |
| 582 | | | ->ieee_802_11.fcs_len = 0; |
| 583 | | | break; |
| 584 | | | |
| 585 | | | case WTAP_ENCAP_ETHERNET: |
| 586 | | | ->eth.fcs_len = 0; |
| 587 | | | break; |
| 588 | | | } |
| 589 | | | |
| 590 | | | |
| 591 | | | |
| 592 | | | |
| 593 | | | errno = WTAP_ERR_CANT_READ; |
| 594 | | | wtap_file_read_expected_bytes(pd, length, wth->random_fh, err);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/wiretap/wtap-int.h |
| |
466 | #define wtap_file_read_expected_bytes(target, num_bytes, fh, err) \ |
467 | G_STMT_START \ |
468 | { \ |
469 | int _bytes_read; \ |
470 | _bytes_read = file_read((target), 1, (num_bytes), (fh)); \ |
471 | if (_bytes_read != (int) (num_bytes)) { \ |
472 | *(err) = file_error((fh)); \ |
473 | if (*(err) == 0 && _bytes_read > 0) { \ |
474 | *(err) = WTAP_ERR_SHORT_READ; \ |
475 | } \ |
476 | return FALSE; \ |
477 | } \ |
478 | } \ |
479 | G_STMT_END |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/wiretap/file_wrappers.h |
| |
36 | #define file_read(buf, bsize, count, file) gzread((file),(buf),(unsigned)((count)*(bsize))) |
| |
|
| 595 | | | return TRUE; |
| 596 | | | } |
| |