aboutsummaryrefslogtreecommitdiffstats
path: root/epan/proto.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-02-21 19:45:08 -0800
committerGuy Harris <guy@alum.mit.edu>2015-02-22 03:45:54 +0000
commit2196378bcb21eb709d24ae3659125dbf6816cff0 (patch)
treeb4705399490771f98156f6d70d8ae1089f8655ba /epan/proto.c
parent8d5da72ff9255a3fd494fb2d842a7ecb9d2c7c14 (diff)
Fetch values appropriately according to the value's type.
This fixes some crashes. Change-Id: I47583777486486114675ba98cb58971adb8b1b10 Reviewed-on: https://code.wireshark.org/review/7305 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/proto.c')
-rw-r--r--epan/proto.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/epan/proto.c b/epan/proto.c
index da59e2ecc6..ac4d6dea8a 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -6665,12 +6665,13 @@ fill_label_number64(field_info *fi, gchar *label_str, gboolean is_signed)
char tmp[ITEM_LABEL_LENGTH+1];
/* Pick the proper format string */
- if (is_signed)
+ if (is_signed) {
format = hfinfo_int64_format(hfinfo);
- else
+ value = fvalue_get_sinteger64(&fi->value);
+ } else {
format = hfinfo_uint64_format(hfinfo);
-
- value = fvalue_get_uinteger64(&fi->value);
+ value = fvalue_get_uinteger64(&fi->value);
+ }
/* Format the temporary string */
if (IS_BASE_DUAL(hfinfo->display))