diff --git a/[refs] b/[refs] index baceda9ca4e5..be7e318c29d0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f984d024190d5df98e448e35aa9e89a46fe50bb9 +refs/heads/master: 878b8619f711280fd05845e21956434b5e588cc4 diff --git a/trunk/drivers/char/selection.c b/trunk/drivers/char/selection.c index f29fbe9b8ed7..cb8ca5698963 100644 --- a/trunk/drivers/char/selection.c +++ b/trunk/drivers/char/selection.c @@ -268,7 +268,7 @@ int set_selection(const struct tiocl_selection __user *sel, struct tty_struct *t /* Allocate a new buffer before freeing the old one ... */ multiplier = use_unicode ? 3 : 1; /* chars can take up to 3 bytes */ - bp = kmalloc((sel_end-sel_start)/2*multiplier+1, GFP_KERNEL); + bp = kmalloc(((sel_end-sel_start)/2+1)*multiplier, GFP_KERNEL); if (!bp) { printk(KERN_WARNING "selection: kmalloc() failed\n"); clear_selection();