chiark / gitweb /
libudev-enumerate.c:udev_enumerate_get_list_entry() fixed possible stale pointer
authorHarald Hoyer <harald@redhat.com>
Mon, 19 Aug 2013 13:18:43 +0000 (15:18 +0200)
committerHarald Hoyer <harald@redhat.com>
Mon, 19 Aug 2013 13:21:49 +0000 (15:21 +0200)
commit763a24a3b62f0eaac43fb58202ad3594f1af09ac
treea8c333f4cd347293617a769af69a57dbab71eeec
parent4bb3a126b7a683a537d4279270c1a22ce6cf5e9f
libudev-enumerate.c:udev_enumerate_get_list_entry() fixed possible stale pointer

If a realloc() happens in syspath_add(), the move_later pointer could
point to an invalid memory region.

Let move_later store the array index, instead of the pointer to the
entry.
src/libudev/libudev-enumerate.c