aboutsummaryrefslogtreecommitdiffstats
path: root/text2pcap.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-12-28 02:18:05 -0800
committerGuy Harris <guy@alum.mit.edu>2014-12-28 10:19:27 +0000
commit120628e5f478a4ee767f87c2b408edb0ed5224ba (patch)
treed52c743b68d9e1b2f8f3d0f9ab5651bcd0c47c1c /text2pcap.c
parent63ebe918d994485679e0d29ab7eb9bda84171fa1 (diff)
Don't check the same character twice in a row, check it and the next character.
Fixes Coverity CID 1260460. Change-Id: Ic9ed109a863bcf20a5e67e4f52d628011f5e9ba5 Reviewed-on: https://code.wireshark.org/review/6087 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'text2pcap.c')
-rw-r--r--text2pcap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/text2pcap.c b/text2pcap.c
index 84c7e0437b..7cd67e44fb 100644
--- a/text2pcap.c
+++ b/text2pcap.c
@@ -1352,7 +1352,7 @@ parse_token (token_t token, char *str)
tmp_str[1] = pkt_lnstart[i*3+1];
tmp_str[2] = '\0';
/* it is a valid convertable string */
- if (!g_ascii_isxdigit(tmp_str[0]) || !g_ascii_isxdigit(tmp_str[0])) {
+ if (!g_ascii_isxdigit(tmp_str[0]) || !g_ascii_isxdigit(tmp_str[1])) {
break;
}
s2[i] = (char)strtoul(tmp_str, (char **)NULL, 16);