[RTEMS Project] #2548: Problematic integer conversion in rtems_clock_get_tod()

RTEMS trac trac at rtems.org
Mon Jan 25 08:22:08 UTC 2016


#2548: Problematic integer conversion in rtems_clock_get_tod()
-----------------------------+--------------------
 Reporter:  sebastian.huber  |      Owner:
     Type:  defect           |     Status:  new
 Priority:  normal           |  Milestone:  4.11.1
Component:  General          |    Version:  4.11
 Severity:  normal           |   Keywords:
-----------------------------+--------------------
 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.

--
Ticket URL: <http://devel.rtems.org/ticket/2548>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list