Overview
| Artifact ID: | 74333d1cd23213ffd9728e28b93bcebdc70c989b532ea235c78b47e5d63a2cd7 |
|---|---|
| Ticket: | fb4a0a66752423622d38c070f89ad81e3b4c2bb8
signed integer overflow in TclpGetClicks() |
| User & Date: | chrstphrchvz on 2022-02-17 00:55:29 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/x-fossil-wiki"
- comment changed to:
Except for maybe 35 minutes before and after the epoch, there is always signed integer overflow in <tt>TclpGetClicks()</tt> implementations: <blockquote><pre> % clock clicks <span style="font-weight:bold">tcl/unix/tclUnixTime.c:152:19:<span style="color:red"> runtime error: </span>signed integer overflow: 1645057584 * 1000000 cannot be represented in type 'long int'</span> 3505507099 </pre></blockquote> The attached patch should avoid this, however I have only tested the case for Unix with <tt>gettimeofday()</tt>, and not the cases for Unix without <tt>gettimeofday()</tt> nor Windows without <tt>NativeGetMicroseconds()</tt>.
- foundin changed to: "core-8-6-branch"
- is_private changed to: "0"
- login: "chrstphrchvz"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "chrstphrchvz"
- subsystem changed to: "16. Commands A-H"
- title changed to: "signed integer overflow in TclpGetClicks()"
- type changed to: "Patch"