Fix for bug 2934.
authorjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 9 Oct 2008 06:24:24 +0000 (06:24 +0000)
committerjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 9 Oct 2008 06:24:24 +0000 (06:24 +0000)
Check that tvb backing is available before accessing it.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26393 f5534014-38df-0310-8fa8-9805f1628bb7

print.c

diff --git a/print.c b/print.c
index bdd72a2609bb9921ed143400b2eddf193bef5754..69cc1c7c3381851e1b24f39fd8b495bc52cc9530 100644 (file)
--- a/print.c
+++ b/print.c
@@ -745,6 +745,9 @@ write_pdml_field_hex_value(write_pdml_data *pdata, field_info *fi)
        int i;
        const guint8 *pd;
 
+       if (!fi->ds_tvb)
+               return;
+
        if (fi->length > tvb_length_remaining(fi->ds_tvb, fi->start)) {
                fprintf(pdata->fh, "field length invalid!");
                return;
@@ -1550,6 +1553,9 @@ get_field_hex_value(GSList* src_list, field_info *fi)
 {
     const guint8 *pd;
 
+    if (!fi->ds_tvb)
+        return NULL;
+
     if (fi->length > tvb_length_remaining(fi->ds_tvb, fi->start)) {
         return "field length invalid!";
     }