Ethereal-dev: [Ethereal-dev] crash bug in packet-smb.c

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

From: Tim Potter <tpot@xxxxxxxxx>
Date: Wed, 5 Dec 2001 11:09:41 +1100
Hi everyone.  I think I found a crash bug in packet-smb.c where trans2
responses appear without their requests:

diff -u -r1.176 packet-smb.c
--- packet-smb.c	2001/11/29 09:05:22	1.176
+++ packet-smb.c	2001/12/05 00:07:35
@@ -10592,7 +10592,8 @@
 		/* transaction2 */
 		if (si->sip != NULL) {
 			t2i = si->sip->extra_info;
-			si->info_level = t2i->info_level;
+			if (t2i)
+				si->info_level = t2i->info_level;
 		} else
 			t2i = NULL;
 		if (t2i == NULL) {

I'm not sure whether this is the nicest way to do it though.  Perhaps
the assignment of si->info_level should happen further down inside the
case where t2i != NULL.


Tim.