diff options
author | Marcus Glocker <mglocker@cvs.openbsd.org> | 2008-07-31 15:26:26 +0000 |
---|---|---|
committer | Marcus Glocker <mglocker@cvs.openbsd.org> | 2008-07-31 15:26:26 +0000 |
commit | 6960c6b7f96163e79aa75b0ef330c8c13fc523bd (patch) | |
tree | 8e0e032c4f1eb24d4ba1679d80005cbf9ef2c97f /sys/dev/video_if.h | |
parent | f2e6d8b2683777ebbb87b4ba5a457be2e7a7fafb (diff) |
- Don't relay on bFormatIndex as an internal array index, since this
field is unreliable and can start with any number. Use an own internal
array index instead.
- If the read buffer is too small, return a propper error to the calling
functions. Just check the buffer size if we use the read(2) method since
it doesn't affect mmap(2).
Fixes kernel crashes seen with the M$ LifeCam NX-6000 and internal
(laptop) Sonix chipsets.
Tested by jcs@ (Sonix) and myself (NX-6000).
OK deraadt@
Diffstat (limited to 'sys/dev/video_if.h')
-rw-r--r-- | sys/dev/video_if.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/video_if.h b/sys/dev/video_if.h index cc5c74486f8..69ff3174164 100644 --- a/sys/dev/video_if.h +++ b/sys/dev/video_if.h @@ -1,4 +1,4 @@ -/* $OpenBSD: video_if.h,v 1.13 2008/06/13 05:00:32 mglocker Exp $ */ +/* $OpenBSD: video_if.h,v 1.14 2008/07/31 15:26:25 mglocker Exp $ */ /* * Copyright (c) 2008 Robert Nagy <robert@openbsd.org> * Copyright (c) 2008 Marcus Glocker <mglocker@openbsd.org> @@ -52,7 +52,7 @@ struct video_hw_if { /* other functions */ int (*get_bufsize)(void *); - void (*start_read)(void *); + int (*start_read)(void *); }; struct video_attach_args { |