Don't assume that certain address columns are always constant strings -

they're no more guaranteed to be constant strings than the columns we're
*not* assuming are constant strings.  Fixes bug 4771.

svn path=/trunk/; revision=32906
This commit is contained in:
Guy Harris 2010-05-20 07:15:27 +00:00
parent 0c40b92518
commit 9d819eb925
1 changed files with 2 additions and 10 deletions

View File

@ -684,6 +684,7 @@ packet_list_change_record(PacketList *packet_list, guint row, gint col, column_i
return;
switch (cfile.cinfo.col_fmt[col]) {
case COL_DEF_SRC:
case COL_RES_SRC: /* COL_DEF_SRC is currently just like COL_RES_SRC */
case COL_UNRES_SRC:
case COL_DEF_DL_SRC:
@ -692,6 +693,7 @@ packet_list_change_record(PacketList *packet_list, guint row, gint col, column_i
case COL_DEF_NET_SRC:
case COL_RES_NET_SRC:
case COL_UNRES_NET_SRC:
case COL_DEF_DST:
case COL_RES_DST: /* COL_DEF_DST is currently just like COL_RES_DST */
case COL_UNRES_DST:
case COL_DEF_DL_DST:
@ -700,16 +702,6 @@ packet_list_change_record(PacketList *packet_list, guint row, gint col, column_i
case COL_DEF_NET_DST:
case COL_RES_NET_DST:
case COL_UNRES_NET_DST:
g_assert(cinfo->col_data[col] != cinfo->col_buf[col]);
/* This is a constant string, so we don't have to copy it */
record->fdata->col_text[col] = (gchar *) cinfo->col_data[col];
record->fdata->col_text_len[col] = (guint) strlen(record->fdata->col_text[col]);
#ifdef NEW_PACKET_LIST_STATISTICS
++packet_list->const_strings;
#endif
break;
case COL_DEF_SRC:
case COL_DEF_DST:
case COL_PROTOCOL:
case COL_INFO:
case COL_IF_DIR: