func: static CVE_2007_6151_PATCHED_isdn_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg) uint minor = iminor ( inode ) ; isdn_ctrl c ; int drvidx ; int i ; void __user * argp = ( void __user * ) arg ; if ( minor == ISDN_MINOR_STATUS )  switch ( cmd )  if ( arg )  int i ; if ( ! dev -> drivers )  if ( minor <= ISDN_MINOR_BMAX )  if ( minor <= ISDN_MINOR_CTRLMAX )  switch ( cmd )  if ( arg )  int i ; if ( copy_from_user ( & iocts , argp , sizeof ( isdn_ioctl_struct ) ) )  iocts . drvid [ sizeof ( iocts . drvid ) - 1 ] = 0; if ( arg )  int i ; if ( arg )  int i ; if ( arg )  if ( copy_from_user ( & iocts , argp , sizeof ( isdn_ioctl_struct ) ) )  iocts . drvid [ sizeof ( iocts . drvid ) - 1 ] = 0; if ( ( cmd & IIOCDRVCTL ) == IIOCDRVCTL )  cmd = ( ( cmd >> _IOC_NRSHIFT ) & _IOC_NRMASK ) & ISDN_DRVIOCTL_MASK; if ( arg )  int i ; if ( copy_from_user ( & iocts , argp , sizeof ( isdn_ioctl_struct ) ) )  iocts . drvid [ sizeof ( iocts . drvid ) - 1 ] = 0; if ( strlen ( iocts . drvid ) )  drvidx = - 1; for (i = 0; i < ISDN_MAX_DRIVERS; i++) if ( ! ( strcmp ( dev -> drvid [ i ] , iocts . drvid ) ) )  drvidx = i; drvidx = 0; if ( drvidx == - 1 )  if ( ! access_ok ( VERIFY_WRITE , argp , sizeof ( isdn_ioctl_struct ) ) )  c . driver = drvidx; c . command = ISDN_CMD_IOCTL; c . arg = cmd; memcpy ( c . parm . num , & iocts . arg , sizeof ( ulong ) ); memcpy ( & iocts . arg , c . parm . num , sizeof ( ulong ) ); if ( copy_to_user ( argp , & iocts , sizeof ( isdn_ioctl_struct ) ) )  