]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Don't try to print entries before the first one in subtypes.
authorfenner <fenner>
Wed, 3 Jul 2002 16:27:12 +0000 (16:27 +0000)
committerfenner <fenner>
Wed, 3 Jul 2002 16:27:12 +0000 (16:27 +0000)
Submitted by: Anonymous sourceforge user (req ID 576536)

print-radius.c

index ff7b8b6abf36e2da36360860c41d1574a0c36068..bf9f62c2b67138419a197fe61f9da7edca2be9eb 100644 (file)
@@ -44,7 +44,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "$Id: print-radius.c,v 1.12 2002-06-11 17:08:55 itojun Exp $";
+    "$Id: print-radius.c,v 1.13 2002-07-03 16:27:12 fenner Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -526,7 +526,8 @@ print_attr_num(register u_char *data, u_int length, u_short attr_code )
          data_value = EXTRACT_32BITS(data);
       }
       if ( data_value <= (attr_type[attr_code].siz_subtypes - 1 +
-            attr_type[attr_code].first_subtype) )
+            attr_type[attr_code].first_subtype) &&
+          data_value >= attr_type[attr_code].first_subtype )
          printf("{%s}",table[data_value]);
       else
          printf("{#%d}",data_value);