diff options
author | Gerald Combs <gerald@wireshark.org> | 2011-04-07 23:16:05 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2011-04-07 23:16:05 +0000 |
commit | 56bc7f5e47bdb0254e647aee9a5d6ba79787a934 (patch) | |
tree | 9ec277c86ad62277a207ea0af1f7dbe0f79e3853 /wiretap/iseries.c | |
parent | d00527f3690b6ca2b685d77538b1ff6c7d645da9 (diff) | |
download | wireshark-56bc7f5e47bdb0254e647aee9a5d6ba79787a934.tar.gz |
Be more picky about our sscanf integer field widths. Hopefully this will
help squelch Coverity CIDs 701-709.
svn path=/trunk/; revision=36511
Diffstat (limited to 'wiretap/iseries.c')
-rw-r--r-- | wiretap/iseries.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wiretap/iseries.c b/wiretap/iseries.c index 6265960480..47a02f3969 100644 --- a/wiretap/iseries.c +++ b/wiretap/iseries.c @@ -317,7 +317,7 @@ iseries_check_file_type (wtap * wth, int *err, int format) * extract it here and store for all packets to access */ num_items_scanned = sscanf (buf, - " START DATE/TIME . . . . . . : %d/%d/%d", + " START DATE/TIME . . . . . . : %2d/%2d/%4d", &iseries->month, &iseries->day, &iseries->year); if (num_items_scanned == 3) @@ -527,7 +527,7 @@ iseries_parse_packet (wtap * wth, FILE_T fh, } num_items_scanned = sscanf (data, - "%6d %1s %6d %d:%d:%d.%d %12s %12s ETHV2 Type: %4s", + "%6d %1s %6d %2d:%2d:%2d.%9d %12s %12s ETHV2 Type: %4s", &pktnum, direction, &cap_len, &hr, &min, &sec, &csec, destmac, srcmac, type); if (num_items_scanned == 10) |