Add a catch-all if statement for column formats that are filled in by
authorGerald Combs <gerald@wireshark.org>
Fri, 30 Apr 2010 20:49:41 +0000 (20:49 -0000)
committerGerald Combs <gerald@wireshark.org>
Fri, 30 Apr 2010 20:49:41 +0000 (20:49 -0000)
dissectors. Fixes bug 4732.

svn path=/trunk/; revision=32615

epan/column-utils.c

index 87a88ed964d9c9718f7943554b3d5ab32e150459..be71c328b92b87795d3d5e41582c8ad2316c1ccf 100644 (file)
@@ -1508,35 +1508,18 @@ col_fill_in(packet_info *pinfo, const gboolean fill_col_exprs, const gboolean fi
       pinfo->cinfo->col_data[i] = pinfo->cinfo->col_buf[i];
       break;
 
-    case COL_CUSTOM:    /* done by col_custom_set_edt() */
-      break;
-
-    case COL_PROTOCOL:  /* currently done by dissectors */
-    case COL_INFO:      /* currently done by dissectors */
-      break;
-
-    case COL_IF_DIR:    /* currently done by dissectors */
-      break;
-
-    case COL_DCE_CALL:  /* done by dcerpc */
-      break;
-
-    case COL_8021Q_VLAN_ID: /* done by packet-nstrace.c and packet-vlan.c */
-      break;
-
-    case COL_EXPERT:    /* done by expert.c */
-      break;
-
-    case COL_FREQ_CHAN: /* done by radio dissectors */
-      break;
-
-    case COL_TX_RATE:  /* done by packet-radiotap.c */
-      break;
-
     case NUM_COL_FMTS:  /* keep compiler happy - shouldn't get here */
-    default:
       g_assert_not_reached();
       break;
+    default:
+      if (pinfo->cinfo->col_fmt[i] >= NUM_COL_FMTS) {
+        g_assert_not_reached();
+      }
+      /*
+       * Formatting handled by col_custom_set_edt() (COL_CUSTOM), expert.c
+       * (COL_EXPERT), or individual dissectors.
+       */
+      break;
     }
   }
 }