author | Florian Pose <fp@igh-essen.com> |
Fri, 25 Apr 2014 17:05:39 +0200 | |
branch | stable-1.5 |
changeset 2559 | a24ff468cb25 |
parent 2558 | 4e17a99a6bb4 |
child 2560 | 442634814e29 |
--- a/devices/ccat/update.c Fri Apr 25 17:05:12 2014 +0200 +++ b/devices/ccat/update.c Fri Apr 25 17:05:39 2014 +0200 @@ -165,7 +165,10 @@ if (*off + len > sizeof(update->data)) return 0; - copy_from_user(update->data + *off, buf, len); + if (copy_from_user(update->data + *off, buf, len)) { + return -EFAULT; + } + *off += len; update->size = *off; return len;