diff options
author | Peter Wu <peter@lekensteyn.nl> | 2015-10-11 11:25:34 +0200 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2015-10-13 07:35:17 +0000 |
commit | 2f454a3f8c5c8d87b346c5b52ce5846625b7053c (patch) | |
tree | 6d417785501f9cf1cd4c0114873bf1e49cf14b12 | |
parent | a386fc99ac72b4cdb88cb3d26fd19d6251391b96 (diff) |
ssl-utils: fix anchoring matches in keylog file
Somehow "# CLIENT_RANDOM" would also be matched by the regex. It turns
out that glib requires two flags to enable anchoring.
This issue also causes silent truncation of keylog lines rather than
reporting no match.
Change-Id: Ib51265b6ec428988c222b4f3bc3cbc99ef0d72bf
Reviewed-on: https://code.wireshark.org/review/10933
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
-rw-r--r-- | epan/dissectors/packet-ssl-utils.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/epan/dissectors/packet-ssl-utils.c b/epan/dissectors/packet-ssl-utils.c index cc40ac35d7..a4bb75ce20 100644 --- a/epan/dissectors/packet-ssl-utils.c +++ b/epan/dissectors/packet-ssl-utils.c @@ -4575,8 +4575,9 @@ ssl_compile_keyfile_regex(void) GError *gerr = NULL; if (!regex) { - regex = g_regex_new(pattern, G_REGEX_OPTIMIZE, - G_REGEX_MATCH_ANCHORED, &gerr); + regex = g_regex_new(pattern, + (GRegexCompileFlags)(G_REGEX_OPTIMIZE | G_REGEX_ANCHORED), + G_REGEX_MATCH_ANCHORED, &gerr); if (gerr) { ssl_debug_printf("%s failed to compile regex: %s\n", G_STRFUNC, gerr->message); |