fix our-of-bounds bug in teh port to string conversion routine
authorsahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 4 Sep 2003 23:12:46 +0000 (23:12 +0000)
committersahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 4 Sep 2003 23:12:46 +0000 (23:12 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@8378 f5534014-38df-0310-8fa8-9805f1628bb7

gtk/endpoint_talkers_table.c

index 91d4fae8f6b9ae143b5fcee2dc033da2f99710bd..61c93c5d8cc6aac1cbf32f6cf52ccbb10d967c88 100644 (file)
@@ -4,7 +4,7 @@
  * endpoint_talkers_table   2003 Ronnie Sahlberg
  * Helper routines common to all endpoint talkers tap.
  *
- * $Id: endpoint_talkers_table.c,v 1.12 2003/09/04 23:11:03 sahlberg Exp $
+ * $Id: endpoint_talkers_table.c,v 1.13 2003/09/04 23:12:46 sahlberg Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -53,6 +53,7 @@ extern GtkWidget   *main_display_filter_widget;
 #define NUM_COLS 10
 
 
+/* convert a port number into a string */
 static char *
 ett_port_to_str(int port_type, guint32 port)
 {
@@ -60,7 +61,7 @@ ett_port_to_str(int port_type, guint32 port)
        static gchar *strp, str[4][12];
 
        i++;
-       if(i>=16){
+       if(i>=4){
                i=0;
        }
        strp=str[i];