author | Richard Cochran <richardcochran@gmail.com> | |
Sun, 1 Nov 2015 11:30:51 +0000 (12:30 +0100) | ||
committer | Richard Cochran <richardcochran@gmail.com> | |
Sun, 3 Apr 2016 12:45:41 +0000 (14:45 +0200) | ||
commit | 01dcf7e9ac2c7d8bec3bbc69b44d1f83b3dfa44e | |
tree | abaa4ab017a50ea4947291a0b10c905131de80de | tree | snapshot (tar.xz tar.gz zip) |
parent | 3f2ef92052ea957fa6591d3045e915f40663b47c | commit | diff |
Properly initialize the message lists.
The message lists are implemented using a TAILQ from queue(3). The heads
of the list must be initialized using the provided macros, since the field
called 'tqh_last' is non-zero in the initial state. This patch fixes a
potential null pointer dereference by properly initializing the queues.
Note that there is no actual bug in the current code, because it uses the
lists in such a way as to initialize 'tqh_last' before any dereference.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
The message lists are implemented using a TAILQ from queue(3). The heads
of the list must be initialized using the provided macros, since the field
called 'tqh_last' is non-zero in the initial state. This patch fixes a
potential null pointer dereference by properly initializing the queues.
Note that there is no actual bug in the current code, because it uses the
lists in such a way as to initialize 'tqh_last' before any dereference.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
msg.c | diff | blob | history | |
port.c | diff | blob | history |