patch-2.1.42 linux/drivers/isdn/sc/command.c

Next file: linux/drivers/isdn/sc/init.c
Previous file: linux/drivers/isdn/sc/Makefile
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.41/linux/drivers/isdn/sc/command.c linux/drivers/isdn/sc/command.c
@@ -1,5 +1,5 @@
 /*
- *  $Id: command.c,v 1.3 1997/02/11 22:53:40 fritz Exp $
+ *  $Id: command.c,v 1.4 1997/03/30 16:51:34 calle Exp $
  *  Copyright (C) 1996  SpellCaster Telecommunications Inc.
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -136,15 +136,12 @@
 		int		err;
 
 		memcpy(&cmdptr, cmd->parm.num, sizeof(unsigned long));
-		if((err = verify_area(VERIFY_READ, 
-			(scs_ioctl *) cmdptr, sizeof(scs_ioctl)))) {
+		if((err = copy_from_user(&ioc, (scs_ioctl *) cmdptr, 
+			sizeof(scs_ioctl)))) {
 			pr_debug("%s: Failed to verify user space 0x%x\n",
 				adapter[card]->devicename, cmdptr);
 			return err;
-
 		}
-		copy_from_user(&ioc, (scs_ioctl *) cmdptr, 
-			sizeof(scs_ioctl));
 		return sc_ioctl(card, &ioc);
 	}
 	case ISDN_CMD_DIAL:

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov