patch-2.4.21 linux-2.4.21/drivers/sound/awe_wave.c

Next file: linux-2.4.21/drivers/sound/cmpci.c
Previous file: linux-2.4.21/drivers/sound/ad1889.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.20/drivers/sound/awe_wave.c linux-2.4.21/drivers/sound/awe_wave.c
@@ -2051,9 +2051,9 @@
 			awe_info.nr_voices = awe_max_voices;
 		else
 			awe_info.nr_voices = AWE_MAX_CHANNELS;
-		memcpy((char*)arg, &awe_info, sizeof(awe_info));
+		if(copy_to_user(arg, &awe_info, sizeof(awe_info)))
+			return -EFAULT;
 		return 0;
-		break;
 
 	case SNDCTL_SEQ_RESETSAMPLES:
 		awe_reset(dev);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)