Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at print.c:785

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

process_packet

(/home/sate/Testcases/c/cve/wireshark-1.2.0/tshark.c)expand/collapse
Show more  
 2396  process_packet(capture_file *cf, gint64 offset, const struct wtap_pkthdr *whdr,
 2397                 union wtap_pseudo_header *pseudo_header, const guchar *pd)
 2398  {
 2399    frame_data fdata;
 2400    gboolean create_proto_tree;
 2401    epan_dissect_t *edt;
 2402    gboolean passed;
 2403   
 2404    /* Count this packet. */
 2405    cf->count++;
 2406   
 2407    /* If we're going to print packet information, or we're going to
 2408       run a read filter, or we're going to process taps, set up to 
 2409       do a dissection and do so. */
 2410    if (do_dissection) {
 2411      fill_in_fdata(&fdata, cf, whdr, offset);
 2412   
 2413      if (print_packet_info) {
 2414        /* Grab any resolved addresses */
 2415   
 2416        if (g_resolv_flags) {
 2417          host_name_lookup_process(NULL);
 2418        }
 2419      }
 2420   
 2421
2443
Show [ Lines 2421 to 2443 omitted. ]
 2444      epan_dissect_run(edt, pseudo_header, pd, &fdata,
 2445                       (print_packet_info && !verbose) ? &cf->cinfo : NULL);
 2446   
 2447      tap_push_tapped_queue(edt);
 2448   
 2449      /* Run the read filter if we have one. */
 2450      if (cf->rfcode)
 2451        passed = dfilter_apply_edt(cf->rfcode, edt);
 2452      else 
 2453        passed = TRUE;
 2454    } else {
 2455      /* We're not running a display filter and we're not printing any 
 2456         packet information, so we don't need to do a dissection, and all
 2457         packets are processed. */
 2458      edt = NULL;
 2459      passed = TRUE;
 2460    }
 2461   
 2462    if (passed) {
 2463      /* Keep the time of the current packet if the packet passed 
 2464         the read filter so that the delta time since last displayed
 2465         packet can be calculated */
 2466      prev_dis_ts = fdata.abs_ts;
 2467   
 2468      /* Process this packet. */
 2469      if (print_packet_info) {
 2470        /* We're printing packet information; print the information for
 2471           this packet. */
 2472[+]       print_packet(cf, edt);
expand/collapse

print_packet

(/home/sate/Testcases/c/cve/wireshark-1.2.0/tshark.c)expand/collapse
Show more  
 2833  print_packet(capture_file *cf, epan_dissect_t *edt)
 2834  {
 2835    print_args_t  print_args;
 2836   
 2837    if (verbose) {
 2838      /* Print the information in the protocol tree. */
 2839      switch (output_action) {
 2840   
 2841      case WRITE_TEXT:
 2842        print_args.to_file = TRUE;
 2843        print_args.format = print_format;
 2844        print_args.print_summary = !verbose;
 2845        print_args.print_hex = verbose && print_hex;
 2846        print_args.print_formfeed = FALSE;
 2847        print_args.print_dissections = verbose ? print_dissections_expanded : print_dissections_none;
 2848   
 2849        /* init the packet range */
 2850
2881
Show [ Lines 2850 to 2881 omitted. ]
 2882          break;
 2883   
 2884      case WRITE_XML:
 2885          proto_tree_write_psml(edt, stdout);
 2886          return !ferror(stdout);
 2887      case WRITE_FIELDS: /*No non-verbose "fields" format */
 2888          g_assert_not_reached();
 2889          break;
 2890      }
 2891    }
 2892    if (print_hex) {
 2893[+]     if (!print_hex_data(print_stream, edt))
expand/collapse

print_hex_data

(/home/sate/Testcases/c/cve/wireshark-1.2.0/print.c)expand/collapse
Show more  
 768  print_hex_data(print_stream_t *stream, epan_dissect_t *edt)
 769  {
 770          gboolean multiple_sources;
 771          GSList *src_le;
 772          data_source *src;
 773          tvbuff_t *tvb;
 774          char *name;
 775          char *line;
 776          const guchar *cp;
 777          guint length;
 778   
 779          /*
 780           * Set "multiple_sources" iff this frame has more than one 
 781           * data source; if it does, we need to print the name of 
 782           * the data source before printing the data from the 
 783           * data source.
 784           */
 785          multiple_sources = (edt->pi.data_src->next != NULL);
Show more  
Show more  
Show more  




Change Warning 4887.31548 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: