--- ns.c.orig	Wed Oct 16 22:07:32 2002
+++ ns.c	Wed Oct 16 22:09:05 2002
@@ -148,8 +148,8 @@ pread_ns(
 
 	tcpb->th_sport = tcpb->th_dport = iteration;
 
-	is_tcp = strcmp(type, "tcp") == 0;
-	is_ack = strcmp(type, "ack") == 0;
+	is_tcp = strncmp(type, "tcp", sizeof(type)) == 0;
+	is_ack = strncmp(type, "ack", sizeof(type)) == 0;
 
 	/* if it's not a TCP data segment or ACK, discard and try again */
 	if (!is_tcp && !is_ack)
@@ -313,8 +313,8 @@ int pread_ns_fulltcp(
 	}
 
 	tcpb->th_sport = tcpb->th_dport = iteration;
-	is_tcp = strcmp(type, "tcp") == 0;
-	is_ack = strcmp(type, "ack") == 0;
+	is_tcp = strncmp(type, "tcp", sizeof(type)) == 0;
+	is_ack = strncmp(type, "ack", sizeof(type)) == 0;
 	
 	/* if it's not a TCP data segment or ACK, discard and try again */
 	if (!is_tcp && !is_ack)
