(/home/sate/Testcases/c/cve/wireshark-1.2.0/capture_info.c) |
| |
| 202 | | | gboolean capture_info_new_file(const char *new_filename) |
| 203 | | | { |
| 204 | | | int err; |
| 205 | | | gchar *err_info; |
| 206 | | | char err_msg[2048+1]; |
| 207 | | | |
| 208 | | | |
| 209 | | | if(info_data.wtap != NULL) { |
Event 1:
Skipping " if". info_data.wtap != (void *)0 evaluates to false.
hide
|
|
| 210 | | | wtap_close(info_data.wtap); |
| 211 | | | } |
| 212 | | | |
| 213 | [+] | | info_data.wtap = wtap_open_offline(new_filename, &err, &err_info, FALSE); |
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
|
|
 |
| 214 | | | if (!info_data.wtap) { |
Event 6:
Taking true branch. info_data.wtap evaluates to false.
hide
|
|
| 215 | | | g_snprintf(err_msg, sizeof err_msg, |
| 216 | | | cf_open_error_message(err, err_info, FALSE, WTAP_FILE_PCAP), |
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 |
|
| 217 | | | new_filename); |
| |