Travis Staloch 5bbacb0c8c fmt.parseWithSign(): prevent edge case overflows
previously when T was smaller than 8 bits, it was possible for base
to overflow T (because base is a u8).  this patch prevents this by
accumulating into a U rather than T which is at least 8 bits wide.

this is the best way i could think of to maintain performance.  this
will only affect parsing of integers less than 8 bits by adding one
additional cast at return.  additionally, this patch may be slightly
slower to return an error for integers less than 8 bits which overflow
because it will accumulate a few more digits before the overflow check
at return.

* add tests which previously overflowed when they shouldn't have

closes #18157
2023-12-11 17:49:22 +02:00
..
2023-11-25 12:28:19 +02:00
2023-11-22 19:08:55 -07:00
2023-11-22 13:24:27 -05:00
2023-11-22 13:24:27 -05:00
2023-12-08 15:58:08 +02:00
2023-11-26 14:28:22 -05:00
2023-11-22 13:24:27 -05:00
2023-11-22 19:08:55 -07:00
2023-11-25 12:28:19 +02:00
2023-10-23 22:42:18 -04:00
2023-10-02 15:31:49 -06:00
2023-11-09 17:41:14 +01:00
2023-11-22 13:24:27 -05:00
2023-11-22 15:24:57 -07:00
2023-11-22 13:24:27 -05:00
2023-10-31 21:37:35 -04:00
2023-10-25 04:28:30 -04:00
2023-11-03 23:18:21 -04:00
2023-12-11 17:48:18 +02:00
2023-11-19 09:55:07 +00:00
2023-11-22 13:24:27 -05:00
2023-10-27 03:33:49 -04:00
2023-11-22 13:24:27 -05:00
2023-11-22 19:08:55 -07:00
2023-11-22 07:40:30 +00:00
2023-10-21 21:24:55 +00:00
2023-10-21 21:24:55 +00:00