Skip to content
Snippets Groups Projects
Commit dc30a436 authored by Asim Kadav's avatar Asim Kadav Committed by Takashi Iwai
Browse files

sound: oss/pas2: Fix possible access out of array


Added a fix for hardware dependence bug where a sound card failure
should not result in reading beyond array memory index.

Signed-off-by: default avatarAsim Kadav <kadav@cs.wisc.edu>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent b7b435e8
No related branches found
No related tags found
No related merge requests found
......@@ -333,6 +333,11 @@ static void __init attach_pas_card(struct address_info *hw_config)
{
char temp[100];
if (pas_model < 0 ||
pas_model >= ARRAY_SIZE(pas_model_names)) {
printk(KERN_ERR "pas2 unrecognized model.\n");
return;
}
sprintf(temp,
"%s rev %d", pas_model_names[(int) pas_model],
pas_read(0x2789));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment