Notice: We have migrated to GitLab launching 2024-05-01 see here:

#2548 closed defect (fixed)

Problematic integer conversion in rtems_clock_get_tod()

Reported by: Sebastian Huber Owned by: Needs Funding
Priority: normal Milestone: Indefinite
Component: unspecified Version: 4.11
Severity: normal Keywords: qualification
Cc: Blocked By:


We have

uint32_t days;

days = now.tv_sec / RTEMS_SECS_PER_DAY;

which converts time_t to uint32_t without any checks that this conversion is valid.

Change History (4)

comment:1 Changed on 01/26/17 at 07:16:00 by Sebastian Huber


comment:2 Changed on 02/15/17 at 13:37:51 by Sebastian Huber

Milestone: 4.11.2Indefinite
Owner: set to Needs Funding
Status: newassigned

comment:3 Changed on 06/18/21 at 09:24:45 by Sebastian Huber

Keywords: qualification added

comment:4 Changed on 09/30/21 at 05:27:45 by Sebastian Huber <sebastian.huber@…>

Resolution: fixed
Status: assignedclosed

In [changeset:"abda5595f89e3a02d5c99ca5c44b170f1c49d1e5/rtems" abda559/rtems]:

rtems: Justify integer conversions

Close #2548.

Note: See TracTickets for help on using tickets.