diff options
author | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-04-07 23:16:05 +0000 |
---|---|---|
committer | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-04-07 23:16:05 +0000 |
commit | aed18268f4341f7310ad9fd08fd582e7e4249f47 (patch) | |
tree | 9ec277c86ad62277a207ea0af1f7dbe0f79e3853 /wiretap/iseries.c | |
parent | 785e93397a8209b8ba33ed1d8bf59499a1efa867 (diff) |
Be more picky about our sscanf integer field widths. Hopefully this will
help squelch Coverity CIDs 701-709.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36511 f5534014-38df-0310-8fa8-9805f1628bb7
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) |