diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-02-16 14:33:57 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-02-16 14:33:57 (GMT) |
commit | 9d7c90707095d35a8f27a6675b2e360c3cb486d2 (patch) | |
tree | 31c58de33761242032fe62159d4d8beabfd92baa /generic | |
parent | 742e278e9241e450b09d5e89a3acfce1d696ace9 (diff) | |
download | tcl-9d7c90707095d35a8f27a6675b2e360c3cb486d2.zip tcl-9d7c90707095d35a8f27a6675b2e360c3cb486d2.tar.gz tcl-9d7c90707095d35a8f27a6675b2e360c3cb486d2.tar.bz2 |
Fix [7deeddb36]: signed integer overflow in Tcl_ScanObjCmd()
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclScan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclScan.c b/generic/tclScan.c index 6ab17bd..f6ff7a9 100644 --- a/generic/tclScan.c +++ b/generic/tclScan.c @@ -923,7 +923,7 @@ Tcl_ScanObjCmd( if (Tcl_GetWideIntFromObj(NULL, objPtr, &wideValue) != TCL_OK) { wideValue = ~(Tcl_WideUInt)0 >> 1; /* WIDE_MAX */ if (TclGetString(objPtr)[0] == '-') { - wideValue++; /* WIDE_MAX + 1 = WIDE_MIN */ + wideValue += 1U; /* WIDE_MAX + 1 = WIDE_MIN */ } } if ((flags & SCAN_UNSIGNED) && (wideValue < 0)) { |