summaryrefslogtreecommitdiff
path: root/extcap/ciscodump.c
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2016-09-06 14:42:29 +0200
committerPeter Wu <peter@lekensteyn.nl>2016-09-06 19:58:26 +0000
commit26551ba411a41f5fc35141031f04b4462c039c8f (patch)
tree54a3efe7c3e7fe3fb68f77b385f5f9b710d95b78 /extcap/ciscodump.c
parent595610f9cc2a27f0eb495c2513499e615666cf7e (diff)
downloadwireshark-26551ba411a41f5fc35141031f04b4462c039c8f.tar.gz
ciscodump: fix line parsing and fix memleak.
Change-Id: I4aee51d7def06317a543fdc8fa05120af0e68453 Reviewed-on: https://code.wireshark.org/review/17531 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'extcap/ciscodump.c')
-rw-r--r--extcap/ciscodump.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/extcap/ciscodump.c b/extcap/ciscodump.c
index 619b930373..eae0edb90d 100644
--- a/extcap/ciscodump.c
+++ b/extcap/ciscodump.c
@@ -208,7 +208,7 @@ static int parse_line(char* packet _U_, unsigned* offset, char* line, int status
/* ABCDEF01: 01020304 05060708 090A0B0C 0D0E0F10 ................ */
/* Note that any of the 4 groups are optional and that a group can be 1 to 4 bytes long */
parts = g_regex_split_simple(
- "^[\\dA-Z]{8,8}:\\s+([\\dA-Z]{2,8})\\s+([\\dA-Z]{2,8}){0,1}\\s+([\\dA-Z]{2,8}){0,1}\\s+([\\dA-Z]{2,8}){0,1}.*",
+ "^[\\dA-F]{8,8}:\\s+([\\dA-F]{2,8})\\s+([\\dA-F]{2,8}){0,1}\\s+([\\dA-F]{2,8}){0,1}\\s+([\\dA-F]{2,8}){0,1}.*",
line, G_REGEX_CASELESS, G_REGEX_MATCH_ANCHORED);
part = parts;
@@ -222,6 +222,7 @@ static int parse_line(char* packet _U_, unsigned* offset, char* line, int status
}
part++;
}
+ g_strfreev(parts);
return CISCODUMP_PARSER_IN_PACKET;
}