fix read beyond end of array in gus_wave.c
Subsystems (2)
PATCH 1/1 fix read beyond end of array in gus_wave.c
G'day list
Coverity spotted a static overrun in sound/oss/gus_wave.c @ line 1099
This is not a big problem as it can only _read_ a value (array + 1) and this is oss, but I thought I should submit a patch anyway.
The patch below just extends an earlier check of the array index to catch the (array + 1) error.
Signed-off-by Darren Jenkins <[email protected]>
sound/oss/gus_wave.c renamed from sound/oss/gus_wave.c.orig +1 -1
@@ -1085,7 +1085,7 @@ static int guswave_set_instr(int dev, in {int sample_no; -if (instr_no <0 || instr_no >MAX_PATCH ) +if (instr_no <0 || instr_no >=MAX_PATCH ) instr_no =0 ;/* Default to acoustic piano */ if (voice <0 || voice >31 )
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors