(/home/sate/Testcases/c/cve/wireshark-1.2.0/file.c) |
| |
| 228 | | | cf_open(capture_file *cf, const char *fname, gboolean is_tempfile, int *err) |
| 229 | | | { |
| 230 | | | wtap *wth; |
| 231 | | | gchar *err_info; |
| 232 | | | |
| 233 | [+] | | wth = wtap_open_offline(fname, err, &err_info, TRUE); |
Event 1:
!0 evaluates to true.
hide
Event 2:
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
|
|
 |
| 234 | | | if (wth == NULL) |
Event 6:
Taking true branch. wth == (void *)0 evaluates to true.
hide
|
|
| 235 | | | goto fail; |
| 236 | | | |
| 237 | | | |
| 238 | | | |
| 239 | | | cf_reset_state(cf); |
| 240 | | | |
| 241 | | | |
| 242 | | | init_dissection(); |
| 243 | | | |
| 244 | | | |
| 245 | | | cf->state = FILE_READ_IN_PROGRESS; |
| 246 285 |  | | [ Lines 246 to 285 omitted. ] |
| 286 | | | |
| 287 | | | fileset_file_opened(fname); |
| 288 | | | |
| 289 | | | if(cf->cd_t == WTAP_FILE_BER) { |
| 290 | | | |
| 291 | | | ber_set_filename(cf->filename); |
| 292 | | | } |
| 293 | | | |
| 294 | | | return CF_OK; |
| 295 | | | |
| 296 | | | fail: |
| 297 | | | cf_open_failure_alert_box(fname, *err, err_info, FALSE, 0); |
Uninitialized Variable
err_info was not initialized. The issue can occur if the highlighted code executes. See related event 2. Show: All events | Only primary events |
|
| |