Wireshark-commits: [Wireshark-commits] master c7fc280: Make the ws_strto* routines more like the st
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=c7fc2802221877d939bb939f04766a5a30cfdb9f
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
c7fc280 by Guy Harris (guy@xxxxxxxxxxxx):
Make the ws_strto* routines more like the strto* routines.
Not all uses of atoi() or various strto* routines in Wireshark expect
the string to contain *only* a number, so not all uses should require
that the byte after the number be a '\0'. Have the ws_strto* routines
take a "pointer a pointer set to point to the character after the
number" argument, and have the callers do the appropriate checks of the
character after that.
This fixes the VMS trace reading code so that it can read those files
again.
The get_ routines are handed command-line arguments, so they *do* expect
the string to contain only a number; have them check to make sure the
byte after the number is a '\0'.
Change-Id: I46fc1bea7912b9278e385fe38491a0a2ad60d697
Reviewed-on: https://code.wireshark.org/review/17560
Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
Actions performed:
from a66aa4c Add M2AP to release notes
adds c7fc280 Make the ws_strto* routines more like the strto* routines.
Summary of changes:
wiretap/vms.c | 3 ++-
wsutil/clopts_common.c | 5 +++--
wsutil/strtoi.c | 38 ++++++++++++++++++++++++++------------
wsutil/strtoi.h | 18 ++++++++++--------
4 files changed, 41 insertions(+), 23 deletions(-)