summaryrefslogtreecommitdiff
path: root/shared-core/nouveau_object.c
diff options
context:
space:
mode:
authorStephane Marchesin <marchesin@icps.u-strasbg.fr>2006-11-21 23:32:58 +0100
committerStephane Marchesin <marchesin@icps.u-strasbg.fr>2006-11-21 23:32:58 +0100
commit0a364be289c27c81a1d157c94291bdf60b43299e (patch)
tree208513602361258ec213891a80ba87f35385dd9c /shared-core/nouveau_object.c
parent5e7f58474dbc766632a71c3eb556e24ead6c6afc (diff)
parentadf71cb29b72b7d199f737b7b00eb7e80939ea4b (diff)
Merge branch 'nouveau-1' of git+ssh://marcheu@git.freedesktop.org/git/mesa/drm into nouveau-1
Diffstat (limited to 'shared-core/nouveau_object.c')
-rw-r--r--shared-core/nouveau_object.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/shared-core/nouveau_object.c b/shared-core/nouveau_object.c
index abd8bec5..0db92ec4 100644
--- a/shared-core/nouveau_object.c
+++ b/shared-core/nouveau_object.c
@@ -523,6 +523,8 @@ int nouveau_ioctl_object_init(DRM_IOCTL_ARGS)
int fifo;
fifo = nouveau_fifo_id_get(dev, filp);
+ if (fifo == -1)
+ return DRM_ERR(EINVAL);
DRM_COPY_FROM_USER_IOCTL(init, (drm_nouveau_object_init_t __user *)
data, sizeof(init));
@@ -577,6 +579,8 @@ int nouveau_ioctl_dma_object_init(DRM_IOCTL_ARGS)
int fifo;
fifo = nouveau_fifo_id_get(dev, filp);
+ if (fifo == -1)
+ return DRM_ERR(EINVAL);
DRM_COPY_FROM_USER_IOCTL(init, (drm_nouveau_dma_object_init_t __user *)
data, sizeof(init));