* [patch -next] sound/asihpi: incorrect range check
@ 2010-05-14 14:50 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2010-05-14 14:50 UTC (permalink / raw)
To: Jaroslav Kysela
Cc: Takashi Iwai, Eliot Blennerhassett, alsa-devel, kernel-janitors
The entity_type_to_size[] array has LAST_ENTITY_TYPE (11) number of elements,
not LAST_ENTITY_ROLE (17). This only affects the debug output.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/sound/pci/asihpi/hpifunc.c b/sound/pci/asihpi/hpifunc.c
index 254c580..eda26b3 100644
--- a/sound/pci/asihpi/hpifunc.c
+++ b/sound/pci/asihpi/hpifunc.c
@@ -3407,7 +3407,7 @@ u16 hpi_entity_alloc_and_pack(const enum e_entity_type type,
if (hE)
return hE;
- HPI_DEBUG_ASSERT(role > entity_role_null && type < LAST_ENTITY_ROLE);
+ HPI_DEBUG_ASSERT(role > entity_role_null && type < LAST_ENTITY_TYPE);
bytes_to_copy = entity_type_to_size[type] * item_count;
total_size = hpi_entity_header_size(*entity) + bytes_to_copy;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-05-14 14:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-14 14:50 [patch -next] sound/asihpi: incorrect range check Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).