Ticket #176 (closed defect: fixed)
opensc unreliable on 64-bit systems
| Reported by: | ken | Owned by: | opensc-devel@… |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | opensc | Version: | 0.11.4 |
| Severity: | major | Keywords: | |
| Cc: |
Description
There is a somewhat pervasive assumption in the code that sizeof(size_t) == sizeof(int). This is pretty much true on all 32-bit systems I know of, but it is often false on 64-bit systems. Depending on the specific compiler and compiler flags used, bugs caused by this assumption might be masked, or may cause mysterious failures. One specific example (and a minimal patch to fix this one problem) are attached, but in general the code ought to be reviewed, changing usage of "int" to "size_t" wherever the intent is to store an object's size or length.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
