diff options
author | David S. Miller <davem@davemloft.net> | 2009-02-02 23:55:27 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-02 23:55:27 -0800 |
commit | fb53fde9762432d091dac209bdf4f3f850117c55 (patch) | |
tree | 607b09022b206a539cb4a924e4ef476443798252 /drivers/char/selection.c | |
parent | eb4400e3a040b90a3ad805b01fcbc99a5f615c8f (diff) | |
parent | b1792e367053968f2ddb48bc911d314143ce6242 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/char/selection.c')
-rw-r--r-- | drivers/char/selection.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/selection.c b/drivers/char/selection.c index f29fbe9b8ed..cb8ca569896 100644 --- a/drivers/char/selection.c +++ b/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(); |