Skip to content

Commit

Permalink
print.c: Print FT_CHAR fields as FT_UINT8
Browse files Browse the repository at this point in the history
This fixes the following asserts

 #2  0x00007ffff0d270f3 in g_assertion_message (domain=0x0, file=0x7ffff4e11f90 "/home/vasko/sources/wireshark/epan/print.c", line=598, func=0x7ffff4e12e20 <__func__.18585> "proto_tree_write_node_pdml",
     message=0x555555aaab70 "code should not be reached") at gtestutils.c:2532
 #3  0x00007ffff0d8015e in g_assertion_message_expr () at gtestutils.c:2555

 #2  0x00007ffff0d270f3 in g_assertion_message (domain=0x0, file=0x7ffff4e11f90 "/home/vasko/sources/wireshark/epan/print.c", line=983,
     func=0x7ffff4e12e40 <__func__.18697> "write_json_proto_node_hex_dump", message=0x555555aac9d0 "code should not be reached") at gtestutils.c:2532
 #3  0x00007ffff0d8015e in g_assertion_message_expr () at gtestutils.c:2555
 #4  0x00007ffff39a8f87 in write_json_proto_node_hex_dump (node=0x7fffdc86e550, data=0x7fffffffce60) at /home/vasko/sources/wireshark/epan/print.c:983

 #2  0x00007ffff0d270f3 in g_assertion_message (domain=0x0, file=0x7ffff4e12010 "/home/vasko/sources/wireshark/epan/print.c", line=1299,
     func=0x7ffff4e12ef0 <__func__.18804> "ek_write_hex", message=0x555555aac290 "code should not be reached") at gtestutils.c:2532
 #3  0x00007ffff0d8015e in g_assertion_message_expr () at gtestutils.c:2555
 #4  0x00007ffff39a9a32 in ek_write_hex (fi=0x7fffdc86e4e0, pdata=0x7fffffffce90) at /home/vasko/sources/wireshark/epan/print.c:1299

Change-Id: I48a7e87863fb6708cd668582a240e5ba71d1b5a0
Reviewed-on: https://code.wireshark.org/review/28891
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Reviewed-on: https://code.wireshark.org/review/28975
  • Loading branch information
velichkov authored and pquantin committed Aug 5, 2018
1 parent 25927d9 commit 3bd9687
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions epan/print.c
Expand Up @@ -575,6 +575,7 @@ proto_tree_write_node_pdml(proto_node *node, gpointer data)
case FT_INT32:
fprintf(pdata->fh, "%X", (guint) fvalue_get_sinteger(&fi->value));
break;
case FT_CHAR:
case FT_UINT8:
case FT_UINT16:
case FT_UINT24:
Expand Down Expand Up @@ -960,6 +961,7 @@ write_json_proto_node_hex_dump(proto_node *node, write_json_data *data)
case FT_INT32:
fprintf(data->fh, "%X", (guint) fvalue_get_sinteger(&fi->value));
break;
case FT_CHAR:
case FT_UINT8:
case FT_UINT16:
case FT_UINT24:
Expand Down Expand Up @@ -1270,6 +1272,7 @@ ek_write_hex(field_info *fi, write_json_data *pdata)
case FT_INT32:
fprintf(pdata->fh, "%X", (guint) fvalue_get_sinteger(&fi->value));
break;
case FT_CHAR:
case FT_UINT8:
case FT_UINT16:
case FT_UINT24:
Expand Down

0 comments on commit 3bd9687

Please sign in to comment.