[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS: cvs.openbsd.org: src

Module name:	src
Changes by:	mglocker_(_at_)_cvs_(_dot_)_openbsd_(_dot_)_org	2008/07/26 05:42:43

Modified files:
	sys/dev        : video.c 
	sys/dev/usb    : uvideo.c uvideo.h 

Log message:
Since we are able to change the device image resolution on the fly in the
meantime, the memory allocation for the read(2) method for video(4)
is not right anymore, and can cause a buffer overflow.

We fix this by queuering the maximum available image size for a device at
attach time.  If the image size should exceed our video(4) buffer after a
video format change (which shouldn't happen), uvideo(4) will gracefully

Also tested by kettenis@

Visit your host, monkey.org