Index: packet-ipx.c
===================================================================
RCS file: /cvsroot/ethereal/packet-ipx.c,v
retrieving revision 1.114
diff -u -r1.114 packet-ipx.c
--- packet-ipx.c	2002/10/15 04:30:58	1.114
+++ packet-ipx.c	2002/10/18 15:37:29
@@ -436,15 +436,17 @@
 		low_socket = pinfo->srcport;
 		high_socket = pinfo->destport;
 	}
-
-	next_tvb = tvb_new_subset(tvb, SPX_HEADER_LEN, -1, -1);
-	if (dissector_try_port(spx_socket_dissector_table, low_socket,
-	    next_tvb, pinfo, tree))
-		return;
-	if (dissector_try_port(spx_socket_dissector_table, high_socket,
-	    next_tvb, pinfo, tree))
-		return;
-	call_dissector(data_handle, next_tvb, pinfo, tree);
+    if(tvb_length_remaining(tvb, 12) >= 4)
+    {
+	    next_tvb = tvb_new_subset(tvb, SPX_HEADER_LEN, -1, -1);
+	    if (dissector_try_port(spx_socket_dissector_table, low_socket,
+	        next_tvb, pinfo, tree))
+		    return;
+	    if (dissector_try_port(spx_socket_dissector_table, high_socket,
+	        next_tvb, pinfo, tree))
+		    return;
+	    call_dissector(data_handle, next_tvb, pinfo, tree);
+    }
 }
 
 /* ================================================================= */
