(/home/sate/Testcases/c/cve/wireshark-1.2.0/plugins/asn1/packet-asn1.c) |
| |
| 2803 | | | read_asn1_type_table(const char *filename) |
| 2804 | | | { |
| 2805 | | | FILE *f; |
| 2806 | | | guint size; |
| 2807 | | | guchar *data; |
| 2808 | | | struct stat stat; |
| 2809 | | | static guint mylogh = 0; |
| 2810 | | | |
| 2811 | | | if ((filename == 0) || (strlen(filename) == 0)) |
Event 1:
Skipping " if". - filename == 0 evaluates to false.
- strlen(filename) == 0 evaluates to false.
hide
|
|
| 2812 | | | return; |
| 2813 | | | |
| 2814 | | | f = ws_fopen(filename, "rb"); |
| 2815 | | | if (f == 0) { |
Event 2:
Skipping " if". f == 0 evaluates to false.
hide
|
|
| 2816 | | | |
| 2817 | | | |
| 2818 | | | |
| 2819 | | | |
| 2820 | | | |
| 2821 | | | |
| 2822 | | | |
| 2823 | | | #ifdef _WIN32 |
| 2824 | | | if (strcmp(filename, bad_separator_old_default_asn1_filename) != 0) |
| 2825 | | | #endif |
| 2826 | | | if ((strcmp(filename, old_default_asn1_filename) != 0) || errno != ENOENT)
x /usr/include/asm-generic/errno-base.h |
| |
5 | #define ENOENT 2 /* No such file or directory */ |
| |
|
| 2827 | | | report_open_failure(filename, errno, FALSE); |
| 2828 | | | return; |
| 2829 | | | } |
| 2830 | | | fstat(fileno(f), &stat); |
Event 3:
fstat() does not initialize stat. - This may be because of a failure case or other special case for fstat(). Consult the fstat() documentation for more information.
hide
|
|
| 2831 | | | size = (int)stat.st_size; |
Uninitialized Variable
stat was not initialized. The issue can occur if the highlighted code executes. See related event 3. Show: All events | Only primary events |
|
| |