Overview
| Artifact ID: | 302d9d264cb87b367e0f0b10ca1c1b0be490d05a9f8f26f6284d2bbf990ce266 |
|---|---|
| Ticket: | 90612089d8423b75a50197df1cdd29d5aef2f062
signed integer overflow in ExprRandFunc() |
| User & Date: | chrstphrchvz on 2021-12-15 22:59:36 |
Changes
- icomment:
Multiplying by 4093 does preserve more useful bits, but it is done after the result of <tt>Tcl_GetCurrentThread()</tt> is temporarily narrowed to an <tt>unsigned int</tt>. Would it be useful to introduce a <tt>PTR2ULONG()</tt> macro, so that the result of <tt>Tcl_GetCurrentThread</tt> isn’t narrowed when <tt>sizeof(Tcl_ThreadId) == sizeof(unsigned long) > sizeof(unsigned int)</tt>?
- login: "chrstphrchvz"
- mimetype: "text/x-fossil-wiki"