|
@@ -263,6 +263,9 @@ dispatch_write(struct file* file, const char __user * buffer,
|
|
* destination so that sscanf can be used on it safely.
|
|
* destination so that sscanf can be used on it safely.
|
|
*/
|
|
*/
|
|
tmp_buffer = kmalloc(count + 1, GFP_KERNEL);
|
|
tmp_buffer = kmalloc(count + 1, GFP_KERNEL);
|
|
|
|
+ if(!tmp_buffer)
|
|
|
|
+ return -ENOMEM;
|
|
|
|
+
|
|
if (copy_from_user(tmp_buffer, buffer, count)) {
|
|
if (copy_from_user(tmp_buffer, buffer, count)) {
|
|
result = -EFAULT;
|
|
result = -EFAULT;
|
|
}
|
|
}
|