Skip to content

Commit

Permalink
isdn: use strlcpy() instead strcpy()
Browse files Browse the repository at this point in the history
I don't think the in-kernel drivers ever hit this strcpy() so this
doesn't change how the code works.  But strlcpy() is safer.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Dec 18, 2013
1 parent 1a81a2e commit 020e867
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/isdn/sc/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ int indicate_status(int card, int event, ulong Channel, char *Data)
memcpy(&cmd.parm.setup, Data, sizeof(cmd.parm.setup));
break;
default:
strcpy(cmd.parm.num, Data);
strlcpy(cmd.parm.num, Data, sizeof(cmd.parm.num));
}
}

Expand Down

0 comments on commit 020e867

Please sign in to comment.