aboutsummaryrefslogtreecommitdiff
path: root/drivers/isdn/i4l
diff options
context:
space:
mode:
authorGreg Kroah-Hartman2013-03-21 16:07:34 -0700
committerGreg Kroah-Hartman2013-03-21 16:07:34 -0700
commit23a376f98c5dcfc392d47e8d1872884ff44e585d (patch)
treedbe476151bbd6530369c40746f2ec2365f7b500a /drivers/isdn/i4l
parent8358f6242dd447a4f694c7bc949bbfc842ca5db1 (diff)
parenta937536b868b8369b98967929045f1df54234323 (diff)
Merge 3.9-rc3 into tty-next
Diffstat (limited to 'drivers/isdn/i4l')
-rw-r--r--drivers/isdn/i4l/isdn_tty.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c
index 221076628585..b72afd81a7bb 100644
--- a/drivers/isdn/i4l/isdn_tty.c
+++ b/drivers/isdn/i4l/isdn_tty.c
@@ -902,7 +902,9 @@ isdn_tty_send_msg(modem_info *info, atemu *m, char *msg)
int j;
int l;
- l = strlen(msg);
+ l = min(strlen(msg), sizeof(cmd.parm) - sizeof(cmd.parm.cmsg)
+ + sizeof(cmd.parm.cmsg.para) - 2);
+
if (!l) {
isdn_tty_modem_result(RESULT_ERROR, info);
return;