Re: [PATCH] tuner-simple: possible read buffer overflow?

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

 



On Sat, 3 Oct 2009, Roel Kluin wrote:
> Prevent read from t_params->ranges[-1].
>
> Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx>
> ---
> This is only required when t_params->count can be 0, can it?

Shouldn't be possible, or the tuner would be useless.

> -	if (i == t_params->count) {
> +	if (i == t_params->count && i) {
>  		tuner_dbg("frequency out of range (%d > %d)\n",
>  			  *frequency, t_params->ranges[i - 1].limit);
>  		*frequency = t_params->ranges[--i].limit;
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux