ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Ethereal-dev: [Ethereal-dev] [Patch] - tethereal.c prevent SEGV after ringbuf switch file - tr

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Brian Avery" <bavery@xxxxxxxxxxxxxx>
Date: Tue, 8 Jun 2004 11:23:31 -0700 (PDT)
Simple patch.  The wtap_dumper in loop_data was being updated when ringbuf
switched files but the dumper passed into write_packet was being used
instead.

-Brian Avery


--- tethereal.c 2004-06-08 14:05:07.337666360 -0400
+++ tethereal.c.bavery  2004-06-08 13:54:08.644395256 -0400
@@ -2556,7 +2556,7 @@
     }
   }
 #endif
-  if (!wtap_dump(pdh, phdr, pseudo_header, buf, &err)) {
+  if (!wtap_dump(ld.pdh, phdr, pseudo_header, buf, &err)) {
 #ifdef HAVE_LIBPCAP
     if (ld.pch != NULL && !quiet) {
       /* We're capturing packets, so (if -q not specified) we're printing