Google
  Web www.spinics.net

Important bugfix Pull request please pull from http://linuxtv.org/hg/~hgoede/v4l-dvb

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


Hi,

While working on gspca this morning I couldn't get it to work _at all_ this is 
due to a nasty bug in get_index() where it fails if its gets called with -1 as 
second param (which is a valid, and even default way of calling it).

I've just pushed a patch to my tree fixing this, the gory details are:

videodev.c: get_index()'s second argument is an int, which may be -1 to
indicate that the first free index should be taken. Currently this gets
compared with a max_index int to make sure the index is not out of range,
currently the max_index is unsigned making this comparison unsigned,
which results in passing -1 as second argument triggering the index out
of range check. This patch fixes this by making max_index signed.

This bug also triggers another bug in video_register_device_index in the
error path of get_index failing, where it tries to get the videodev_lock
while it already holds videodev_lock, this patch also fixes this.

Regards,

Hans



_______________________________________________
v4l-dvb-maintainer mailing list
v4l-dvb-maintainer@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/v4l-dvb-maintainer

[Linux Media]     [Older V4L]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [SSH]     [Linux USB]

-->
Add to Google Powered by Linux

Google PageRank Checking tool