Commit 6c9b9415 authored by David S. Miller's avatar David S. Miller

fs/openpromfs/inode.c: Prevent unsigned roll-over in size of kmalloc.

parent cb3f80c0
......@@ -327,7 +327,7 @@ static ssize_t property_write(struct file *filp, const char *buf,
void *b;
openprom_property *op;
if (filp->f_pos >= 0xffffff)
if ((filp->f_pos + count) >= 0xffffff)
return -EINVAL;
if (!filp->private_data) {
i = property_read (filp, NULL, 0, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment