upgrade to linux 2.6.10-1.12_FC2
[linux-2.6.git] / sound / core / seq / seq_clientmgr.c
index b30fda8..dd7650d 100644 (file)
@@ -420,7 +420,10 @@ static ssize_t snd_seq_read(struct file *file, char __user *buf, size_t count, l
                        count -= err;
                        buf += err;
                } else {
-                       copy_to_user(buf, &cell->event, sizeof(snd_seq_event_t));
+                       if (copy_to_user(buf, &cell->event, sizeof(snd_seq_event_t))) {
+                               err = -EFAULT;
+                               break;
+                       }
                        count -= sizeof(snd_seq_event_t);
                        buf += sizeof(snd_seq_event_t);
                }