From 120628e5f478a4ee767f87c2b408edb0ed5224ba Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 28 Dec 2014 02:18:05 -0800 Subject: 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 --- text2pcap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'text2pcap.c') 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); -- cgit v1.2.1