(/home/sate/Testcases/c/cve/wireshark-1.2.0/wiretap/lanalyzer.c) |
| |
| 714 | | | static gboolean (wtap_dumper *wdh, int *err) |
| 715 | | | { |
| 716 | | | LA_TmpInfo *itmp = (LA_TmpInfo*)(wdh->dump.opaque); |
| 717 | | | struct tm *fT = localtime( (time_t *) &(itmp->start.tv_sec)); |
| 718 | | | guint16 board_type = itmp->encap == WTAP_ENCAP_TOKEN_RING |
| 719 | | | ? BOARD_325TR |
| 720 | | | : BOARD_325; |
| 721 | | | |
| 722 | | | fseek(wdh->fh, 0, SEEK_SET);
x /usr/include/stdio.h |
| |
141 | #define SEEK_SET 0 /* Seek from beginning of file. */ |
| |
|
Ignored Return Value
The return value of fseek() is never checked in the highlighted execution scenario. - If the return value can indicate an error, the error will be ignored if the highlighted code executes.
- CodeSonar is configured to enforce Ignored Return Value checks for fseek(). (To change the set of enforced Ignored Return Value checks, use configuration file parameters RETURN_CHECKER_CHECKED_FUNCS and RETURN_CHECKER_IGNORED_FUNCS).
Show: All events | Only primary events |
|
| 723 | | | |
| 724 | | | *err = swrite(&, sizeof , wdh->fh); |
| 725 | | | if (*err) |
Event 2:
Skipping " if". *err evaluates to false.
hide
|
|
| 726 | | | return FALSE; |
| 727 | | | *err = swrite(&LA_RxChannelNameFake , sizeof LA_RxChannelNameFake , wdh->fh); |
| 728 | | | if (*err) |
Event 3:
Skipping " if". *err evaluates to false.
hide
|
|
| 729 | | | return FALSE; |
| 730 | | | *err = swrite(&LA_TxChannelNameFake , sizeof LA_TxChannelNameFake , wdh->fh); |
| 731 | | | if (*err) |
Event 4:
Skipping " if". *err evaluates to false.
hide
|
|
| 732 | | | return FALSE; |
| 733 | | | *err = swrite(&LA_RxTemplateNameFake, sizeof LA_RxTemplateNameFake, wdh->fh); |
| 734 | | | if (*err) |
Event 5:
Skipping " if". *err evaluates to false.
hide
|
|
| 735 | | | return FALSE; |
| 736 | | | *err = swrite(&LA_TxTemplateNameFake, sizeof LA_TxTemplateNameFake, wdh->fh); |
| 737 | | | if (*err) |
Event 6:
Skipping " if". *err evaluates to false.
hide
|
|
| 738 | | | return FALSE; |
| 739 | | | *err = swrite(&LA_DisplayOptionsFake, sizeof LA_DisplayOptionsFake, wdh->fh); |
| 740 | | | if (*err) |
Event 7:
Skipping " if". *err evaluates to false.
hide
|
|
| 741 | | | return FALSE; |
| 742 | | | |
| 743 | | | *err = s16write(htoles(RT_Summary), wdh->fh); |
| 744 | | | if (*err) |
Event 8:
Skipping " if". *err evaluates to false.
hide
|
|
| 745 | | | return FALSE; |
| 746 | | | *err = s16write(htoles(SummarySize), wdh->fh); |
| 747 | | | if (*err) |
Event 9:
Skipping " if". *err evaluates to false.
hide
|
|
| 748 | | | return FALSE; |
| 749 | | | *err = s8write((guint8) fT->tm_mday, wdh->fh); |
| 750 | | | if (*err) |
Event 10:
Skipping " if". *err evaluates to false.
hide
|
|
| 751 | | | return FALSE; |
| 752 | | | *err = s8write((guint8) (fT->tm_mon+1), wdh->fh); |
| 753 | | | if (*err) |
Event 11:
Skipping " if". *err evaluates to false.
hide
|
|
| 754 | | | return FALSE; |
| 755 | | | *err = s16write(htoles(fT->tm_year + 1900), wdh->fh); |
| 756 | | | if (*err) |
Event 12:
Skipping " if". *err evaluates to false.
hide
|
|
| 757 | | | return FALSE; |
| 758 | | | *err = s8write((guint8) fT->tm_mday, wdh->fh); |
| 759 | | | if (*err) |
Event 13:
Skipping " if". *err evaluates to false.
hide
|
|
| 760 | | | return FALSE; |
| 761 | | | *err = s8write((guint8) (fT->tm_mon+1), wdh->fh); |
| 762 | | | if (*err) |
Event 14:
Skipping " if". *err evaluates to false.
hide
|
|
| 763 | | | return FALSE; |
| 764 | | | *err = s16write(htoles(fT->tm_year + 1900), wdh->fh); |
| 765 | | | if (*err) |
Event 15:
Skipping " if". *err evaluates to false.
hide
|
|
| 766 | | | return FALSE; |
| 767 | | | *err = s8write((guint8) fT->tm_sec, wdh->fh); |
| 768 | | | if (*err) |
Event 16:
Skipping " if". *err evaluates to false.
hide
|
|
| 769 | | | return FALSE; |
| 770 | | | *err = s8write((guint8) fT->tm_min, wdh->fh); |
| 771 | | | if (*err) |
Event 17:
Skipping " if". *err evaluates to false.
hide
|
|
| 772 | | | return FALSE; |
| 773 | | | *err = s8write((guint8) fT->tm_hour, wdh->fh); |
| 774 | | | if (*err) |
Event 18:
Skipping " if". *err evaluates to false.
hide
|
|
| 775 | | | return FALSE; |
| 776 | | | *err = s8write((guint8) fT->tm_mday, wdh->fh); |
| 777 | | | if (*err) |
Event 19:
Skipping " if". *err evaluates to false.
hide
|
|
| 778 | | | return FALSE; |
| 779 | | | *err = s0write(2, wdh->fh); |
| 780 | | | if (*err) |
Event 20:
Skipping " if". *err evaluates to false.
hide
|
|
| 781 | | | return FALSE; |
| 782 | | | *err = s8write((guint8) fT->tm_sec, wdh->fh); |
| 783 | | | if (*err) |
Event 21:
Skipping " if". *err evaluates to false.
hide
|
|
| 784 | | | return FALSE; |
| 785 | | | *err = s8write((guint8) fT->tm_min, wdh->fh); |
| 786 | | | if (*err) |
Event 22:
Skipping " if". *err evaluates to false.
hide
|
|
| 787 | | | return FALSE; |
| 788 | | | *err = s8write((guint8) fT->tm_hour, wdh->fh); |
| 789 | | | if (*err) |
Event 23:
Skipping " if". *err evaluates to false.
hide
|
|
| 790 | | | return FALSE; |
| 791 | | | *err = s8write((guint8) fT->tm_mday, wdh->fh); |
| 792 | | | if (*err) |
Event 24:
Skipping " if". *err evaluates to false.
hide
|
|
| 793 | | | return FALSE; |
| 794 | | | *err = s0write(2, wdh->fh); |
| 795 | | | if (*err) |
Event 25:
Skipping " if". *err evaluates to false.
hide
|
|
| 796 | | | return FALSE; |
| 797 | | | *err = s0write(6, wdh->fh); |
| 798 | | | if (*err) |
Event 26:
Skipping " if". *err evaluates to false.
hide
|
|
| 799 | | | return FALSE; |
| 800 | | | *err = s16write(htoles(1), wdh->fh); |
| 801 | | | if (*err) |
Event 27:
Skipping " if". *err evaluates to false.
hide
|
|
| 802 | | | return FALSE; |
| 803 | | | *err = s16write(htoles(0), wdh->fh); |
| 804 | | | if (*err) |
Event 28:
Skipping " if". *err evaluates to false.
hide
|
|
| 805 | | | return FALSE; |
| 806 | | | *err = s16write(htoles(1514), wdh->fh); |
| 807 | | | if (*err) |
Event 29:
Skipping " if". *err evaluates to false.
hide
|
|
| 808 | | | return FALSE; |
| 809 | | | *err = s32write(htolel(itmp->pkts), wdh->fh); |
| 810 | | | if (*err) |
Event 30:
Skipping " if". *err evaluates to false.
hide
|
|
| 811 | | | return FALSE; |
| 812 | | | *err = s0write(12, wdh->fh); |
| 813 | | | if (*err) |
Event 31:
Skipping " if". *err evaluates to false.
hide
|
|
| 814 | | | return FALSE; |
| 815 | | | *err = s32write(htolel(itmp->pkts), wdh->fh); |
| 816 | | | if (*err) |
Event 32:
Skipping " if". *err evaluates to false.
hide
|
|
| 817 | | | return FALSE; |
| 818 | | | *err = s0write(34*4, wdh->fh); |
| 819 | | | if (*err) |
Event 33:
Skipping " if". *err evaluates to false.
hide
|
|
| 820 | | | return FALSE; |
| 821 | | | *err = s16write(htoles(board_type), wdh->fh); |
| 822 | | | if (*err) |
Event 34:
Skipping " if". *err evaluates to false.
hide
|
|
| 823 | | | return FALSE; |
| 824 | | | *err = s0write(20, wdh->fh); |
| 825 | | | if (*err) |
Event 35:
Skipping " if". *err evaluates to false.
hide
|
|
| 826 | | | return FALSE; |
| 827 | | | |
| 828 | | | *err = s16write(htoles(RT_SubfileSummary), wdh->fh); |
| 829 | | | if (*err) |
Event 36:
Skipping " if". *err evaluates to false.
hide
|
|
| 830 | | | return FALSE; |
| 831 | | | *err = s16write(htoles(LA_SubfileSummaryRecordSize-4), wdh->fh); |
| 832 | | | if (*err) |
Event 37:
Skipping " if". *err evaluates to false.
hide
|
|
| 833 | | | return FALSE; |
| 834 | | | *err = s16write(htoles(1), wdh->fh); |
| 835 | | | if (*err) |
Event 38:
Skipping " if". *err evaluates to false.
hide
|
|
| 836 | | | return FALSE; |
| 837 | | | *err = s32write(htolel(itmp->pkts), wdh->fh); |
| 838 | | | if (*err) |
Event 39:
Skipping " if". *err evaluates to false.
hide
|
|
| 839 | | | return FALSE; |
| 840 | | | |
| 841 | | | *err = swrite(&LA_CyclicInformationFake, sizeof LA_CyclicInformationFake, wdh->fh); |
| 842 | | | if (*err) |
Event 40:
Skipping " if". *err evaluates to false.
hide
|
|
| 843 | | | return FALSE; |
| 844 | | | |
| 845 | | | *err = s16write(htoles(RT_Index), wdh->fh); |
| 846 | | | if (*err) |
Event 41:
Skipping " if". *err evaluates to false.
hide
|
|
| 847 | | | return FALSE; |
| 848 | | | *err = s16write(htoles(LA_IndexRecordSize -4), wdh->fh); |
| 849 | | | if (*err) |
Event 42:
Skipping " if". *err evaluates to false.
hide
|
|
| 850 | | | return FALSE; |
| 851 | | | *err = s16write(htoles(LA_IndexSize), wdh->fh); |
| 852 | | | if (*err) |
Event 43:
Skipping " if". *err evaluates to false.
hide
|
|
| 853 | | | return FALSE; |
| 854 | | | *err = s0write(LA_IndexRecordSize - 6, wdh->fh); |
| 855 | | | if (*err) |
Event 44:
Skipping " if". *err evaluates to false.
hide
|
|
| 856 | | | return FALSE; |
| 857 | | | |
| 858 | | | return TRUE; |
Event 45:
!0 evaluates to true.
hide
|
|
| 859 | | | } |
| |