Text   |  XML   |  ReML   |   Visible Warnings:

Double Close  at dumpcap.c:1593

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

capture_loop_init_output

(/home/sate/Testcases/c/cve/wireshark-1.2.0/dumpcap.c)expand/collapse
Show more  
 1558  capture_loop_init_output(capture_options *capture_opts, int save_file_fd, loop_data *ld, char *errmsg, int errmsg_len) {
 1559    int         err;
 1560   
 1561   
 1562    g_log(LOG_DOMAIN_CAPTURE_CHILD, G_LOG_LEVEL_DEBUG, "capture_loop_init_output");
 1563   
 1564    /* get snaplen */
 1565    if (ld->from_cap_pipe) {
 1566      ld->file_snaplen = ld->cap_pipe_hdr.snaplen;
 1567    } else 
 1568    {
 1569      ld->file_snaplen = pcap_snapshot(ld->pcap_h);
 1570    }
 1571   
 1572    /* Set up to write to the capture file. */
 1573    if (capture_opts->multi_files_on) {
 1574[+]     ld->pdh = ringbuf_init_libpcap_fdopen(&err);
 1575    } else {
 1576      ld->pdh = libpcap_fdopen(save_file_fd, &err);
 1577    }
 1578    if (ld->pdh) {
 1579      gboolean successful;
 1580       
 1581      ld->bytes_written = 0;
 1582      if (capture_opts->use_pcapng) {
 1583        char appname[100];
 1584   
 1585        g_snprintf(appname, sizeof(appname), "Dumpcap " VERSION "%s", wireshark_svnversion);
 1586[+]       successful = libpcap_write_session_header_block(ld->pdh, appname, &ld->bytes_written, &err) &&
 1587                     libpcap_write_interface_description_block(ld->pdh, capture_opts->iface, capture_opts->cfilter, ld->linktype, ld->file_snaplen, &ld->bytes_written, &err);
 1588      } else {
 1589        successful = libpcap_write_file_header(ld->pdh, ld->linktype, ld->file_snaplen,
 1590                                               &ld->bytes_written, &err);
 1591      }
 1592      if (!successful) {
 1593        fclose(ld->pdh);
Show more  




Change Warning 5024.30237 : Double Close

Priority:
State:
Finding:
Owner:
Note: