diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-12-28 02:18:05 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-12-28 10:19:27 +0000 |
commit | 120628e5f478a4ee767f87c2b408edb0ed5224ba (patch) | |
tree | d52c743b68d9e1b2f8f3d0f9ab5651bcd0c47c1c | |
parent | 63ebe918d994485679e0d29ab7eb9bda84171fa1 (diff) | |
download | wireshark-120628e5f478a4ee767f87c2b408edb0ed5224ba.tar.gz wireshark-120628e5f478a4ee767f87c2b408edb0ed5224ba.tar.bz2 wireshark-120628e5f478a4ee767f87c2b408edb0ed5224ba.zip |
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>
-rw-r--r-- | text2pcap.c | 2 |
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); |