aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-acap.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-03-18 22:31:33 -0400
committerMichael Mann <mmann78@netscape.net>2016-03-19 11:42:47 +0000
commit68c84a7e66669eb5300520fd01d5e838d03cced2 (patch)
tree5c4e54fed06d135387fc473cf8d4eb5bbaa80373 /epan/dissectors/packet-acap.c
parenta1837263708cda91caec1691a469ad1415924a8e (diff)
Make sure first byte in ACAP packet is printable.
Saves some false positives for protocols using port 674. Bug: 12265 Change-Id: I7cb8aa9318639db0822b05b8c5b6f6563d8d4afc Reviewed-on: https://code.wireshark.org/review/14521 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-acap.c')
-rw-r--r--epan/dissectors/packet-acap.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/epan/dissectors/packet-acap.c b/epan/dissectors/packet-acap.c
index e42624c0aa..2d83675145 100644
--- a/epan/dissectors/packet-acap.c
+++ b/epan/dissectors/packet-acap.c
@@ -90,6 +90,17 @@ dissect_acap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
int tokenlen;
const guchar *next_token;
+
+ /*
+ * If this should be a request or response, do this quick check to see if
+ * it begins with a string...
+ * Otherwise, looking for the end of line in a binary file can take a long time
+ * and this probably isn't ACAP
+ */
+ if (!g_ascii_isprint(tvb_get_guint8(tvb, offset))) {
+ return 0;
+ }
+
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ACAP");
/*