Source-Changes archive

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

Re: CVS commit: src/sys/dev/wscons



On Friday 10 February 2006 18:33, Christos Zoulas wrote:
> Module Name:  src
> Committed By: christos
> Date:         Fri Feb 10 17:33:02 UTC 2006
>
> Modified Files:
>       src/sys/dev/wscons: wsmouse.c
>
> Log Message:
> PR/32794: Paul Shupak: Panic in wsmouse code.
> Checking the number of events after you've trashed the stack is not very
> useful. Instead, break out of the loop if we ran out, printing a message.

Maybe there should be assertions just before each attempt to modify
events[nevents] to ensure that nevents is low enough.

But... given the way the events vector is sized (to which you added a
comment), in which situation can it overflow?

> Also don't try to inject 0 events; reset our state instead. Maybe having

Theorically the input function is called when there is, at least, an event
to process (this is stated in a comment at the beginning of the function).
Therefore, nevents == 0 cannot happen, isn't it?

-- 
Julio M. Merino Vidal <jmmv84%gmail.com@localhost>
The Julipedia - http://julipedia.blogspot.com/



Home | Main Index | Thread Index | Old Index