(/home/sate/Testcases/c/cve/wireshark-1.2.0/capture_opts.c) |
| |
| 731 | | | gboolean capture_opts_trim_iface(capture_options *capture_opts, const char *capture_device) |
| 732 | | | { |
| 733 | | | GList *if_list; |
| 734 | | | if_info_t *if_info; |
| 735 | | | int err; |
| 736 | | | gchar *err_str; |
| 737 | | | |
| 738 | | | |
| 739 | | | |
| 740 | | | if (capture_opts->iface == NULL) { |
Event 1:
Taking true branch. capture_opts->iface == (void *)0 evaluates to true.
hide
|
|
| 741 | | | |
| 742 | | | if (capture_device != NULL) { |
Event 2:
Taking false branch. capture_device != (void *)0 evaluates to false.
hide
|
|
| 743 | | | |
| 744 | | | capture_opts->iface = g_strdup(capture_device); |
| 745 | | | |
| 746 | | | |
| 747 | | | |
| 748 | | | |
| 749 | | | } else { |
| 750 | | | |
| 751 | [+] | | if_list = get_interface_list(&err, &err_str); |
Event 3:
get_interface_list() does not initialize err_str. - This may be because of a failure case or other special case for get_interface_list().
hide
|
|
 |
| 752 | | | if (if_list == NULL) { |
Event 12:
Taking true branch. if_list == (void *)0 evaluates to true.
hide
|
|
| 753 | | | switch (err) { |
Event 13:
err evaluates to 1.
hide
|
|
| 754 | | | |
| 755 | | | case CANT_GET_INTERFACE_LIST: |
| 756 | | | cmdarg_err("%s", err_str); |
Uninitialized Variable
err_str was not initialized. The issue can occur if the highlighted code executes. See related events 3 and 4. Show: All events | Only primary events |
|
| |