Commit: 3382ea05583bab507791cf31b29075d20942bab1
Parent: e4ad2b67ee2d5dc2e6be6c0cfc18a83899747ce9
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2014-06-27 14:02:25
Tree: cd87d7d3c3b2531a5d73985eabf2b683f0320602

shared/queue: Fix invalid read If the queue elements are destroyed by queue_destroy the head will point to freed memory causing the following error when unit/test-queue is run: Invalid read of size 8 at 0x401040: queue_foreach (queue.c:194) by 0x4E9E5E0: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2) by 0x4E9E7A5: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2) by 0x4E9EB1A: g_test_run_suite (in /usr/lib64/libglib-2.0.so.0.3800.2) by 0x40083E: main (test-queue.c:109) Address 0x7f65738 is 8 bytes inside a block of size 16 free'd at 0x4C28577: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x400E29: queue_destroy (queue.c:93) by 0x40102C: queue_foreach (queue.c:219) by 0x4E9E5E0: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2) by 0x4E9E7A5: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2) by 0x4E9EB1A: g_test_run_suite (in /usr/lib64/libglib-2.0.so.0.3800.2) by 0x40083E: main (test-queue.c:109)

Diffstat

M src/shared/queue.c | 15 +- - - - - - - - - - - - - -

1 files changed, 1 insertions(+), 14 deletions(-)

View Full Diff | Patch