(/home/sate/Testcases/c/cve/wireshark-1.2.0/tshark.c) |
| |
| 3061 | | | cf_open(capture_file *cf, const char *fname, gboolean is_tempfile, int *err) |
| 3062 | | | { |
| 3063 | | | wtap *wth; |
| 3064 | | | gchar *err_info; |
| 3065 | | | char err_msg[2048+1]; |
| 3066 | | | |
| 3067 | [+] | | wth = wtap_open_offline(fname, err, &err_info, FALSE); |
Event 1:
wtap_open_offline() does not initialize err_info. - This may be because of a failure case or other special case for wtap_open_offline().
hide
|
|
 |
| 3068 | | | if (wth == NULL) |
Event 5:
Taking true branch. wth == (void *)0 evaluates to true.
hide
|
|
| 3069 | | | goto fail; |
| 3070 | | | |
| 3071 | | | |
| 3072 | | | |
| 3073 | | | |
| 3074 | | | init_dissection(); |
| 3075 | | | |
| 3076 | | | cf->wth = wth; |
| 3077 | | | cf->f_datalen = 0; |
| 3078 | | | |
| 3079 | | | |
| 3080 3099 |  | | [ Lines 3080 to 3099 omitted. ] |
| 3100 | | | cf->has_snap = TRUE; |
| 3101 | | | nstime_set_zero(&cf->elapsed_time); |
| 3102 | | | nstime_set_unset(&first_ts); |
| 3103 | | | nstime_set_unset(&prev_dis_ts); |
| 3104 | | | nstime_set_unset(&prev_cap_ts); |
| 3105 | | | |
| 3106 | | | cf->state = FILE_READ_IN_PROGRESS; |
| 3107 | | | |
| 3108 | | | return CF_OK; |
| 3109 | | | |
| 3110 | | | fail: |
| 3111 | | | g_snprintf(err_msg, sizeof err_msg, |
| 3112 | | | cf_open_error_message(*err, err_info, FALSE, cf->cd_t), fname); |
Uninitialized Variable
err_info was not initialized. The issue can occur if the highlighted code executes. See related event 1. Show: All events | Only primary events |
|
| |