projects
/
paraslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb9722e
)
audiod get_play_time_slot_num(): Avoid possible NULL pointer dereference.
author
Andre Noll
<maan@systemlinux.org>
Thu, 3 Feb 2011 16:12:53 +0000
(17:12 +0100)
committer
Andre Noll
<maan@systemlinux.org>
Thu, 7 Jul 2011 15:28:38 +0000
(17:28 +0200)
The pointer to the buffer tree node is dereferenced unconditionally
in btr_get_node_start(). This patch makes sure we never pass a NULL
pointer to this function.
audiod_command.c
patch
|
blob
|
history
diff --git
a/audiod_command.c
b/audiod_command.c
index
05059ac
..
a0d0229
100644
(file)
--- a/
audiod_command.c
+++ b/
audiod_command.c
@@
-198,7
+198,7
@@
static int get_play_time_slot_num(void)
FOR_EACH_SLOT(i) {
struct slot_info *s = &slot[i];
struct timeval wstime;
- if (!s->wns)
+ if (!s->wns
|| !s->wns[0].btrn
)
continue;
btr_get_node_start(s->wns[0].btrn, &wstime);
if (oldest_slot >= 0 && tv_diff(&wstime, &oldest_wstime, NULL) > 0)