Skip to contentSkip to conversation

alter assert in dsp_spos_scb_lib.c

PATCH New Darren Jenkins\ 1 participant 1 message Mar 8, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 alter assert in dsp_spos_scb_lib.c

G'day list,

Coverity complains about an 'overrun-local' @ line 1485 of dsp_spos_scb_lib.c.

This is due to an incorrect assertion previously.
The patch below just alters the assert so it will catch the +1 overrun.

sound/pci/cs46xx/dsp_spos_scb_lib.c renamed from sound/pci/cs46xx/dsp_spos_scb_lib.c.orig +1 -1
@@ -1479,7 +1479,7 @@ void cs46xx_dsp_destroy_pcm_channel (str
 	if (!pcm_channel->src_scb->ref_count) {
 		cs46xx_dsp_remove_scb(chip,pcm_channel->src_scb);
 
-		snd_assert (pcm_channel->src_slot >= 0 && pcm_channel->src_slot <= DSP_MAX_SRC_NR,
+		snd_assert (pcm_channel->src_slot >= 0 && pcm_channel->src_slot < DSP_MAX_SRC_NR,
 			    return );
 
 		ins->src_scb_slots[pcm_channel->src_slot] = 0;

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors