[RTEMS Project] #2427: cpukit/libnetworking/libc/getifaddrs.c: Undefined behavior on freeing auto variable if NET_RT_IFLIST isn't defined

RTEMS trac trac at rtems.org
Tue Oct 13 21:14:04 UTC 2015


#2427: cpukit/libnetworking/libc/getifaddrs.c: Undefined behavior on freeing auto
variable if NET_RT_IFLIST isn't defined
---------------------------+--------------------
 Reporter:  martin.galvan  |      Owner:
     Type:  defect         |     Status:  new
 Priority:  normal         |  Milestone:  4.11.1
Component:  General        |    Version:  4.11
 Severity:  normal         |   Keywords:
---------------------------+--------------------
 The 'buf' variable in the getifaddrs function may be defined either as a
 pointer or as an array, depending on whether NET_RT_IFLIST is defined.
 However, we end up doing a free(buf) in both cases.

 While this is FreeBSD code, we're maintaining it for now as an in-tree
 fork of the upstream so we should fix this.

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


More information about the bugs mailing list