NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: powernow driver bug
Hi!
Please file a bug report.
netbsd-bugs is just a mailing list used for the traffic generated by GNATS and
mails like this one will probably fall through most people's filters and get
disregarded.
Thanks,
Thomas
On Fri, Oct 28, 2011 at 09:51:28AM +0200, Maurizio Lombardi wrote:
> Hi,
>
> sys/arch/x86/x86/powernow.c
>
> the following patch fixes an access beyond the limits of a vector:
>
> diff --git a/sys/arch/x86/x86/powernow.c b/sys/arch/x86/x86/powernow.c
> old mode 100644
> new mode 100755
> index c8f1704..8a362f0
> --- a/sys/arch/x86/x86/powernow.c
> +++ b/sys/arch/x86/x86/powernow.c
> @@ -418,8 +418,8 @@ powernow_k7_init(device_t self)
> for (i = 0; i < sc->sc_state->n_states; i++) {
>
> /* Skip duplicated matches. */
> - if (sc->sc_state->state_table[i].freq ==
> - sc->sc_state->state_table[i - 1].freq)
> + if (i > 0 && (sc->sc_state->state_table[i].freq ==
> + sc->sc_state->state_table[i - 1].freq))
> continue;
>
> DPRINTF(("%s: cstate->state_table.freq=%d\n",
>
> Cheers,
>
> --
> --------------------
> Maurizio Lombardi
Home |
Main Index |
Thread Index |
Old Index