[Nut-upsdev] [nut-commits] svn commit r1074 - in trunk: .

Peter Selinger selinger at mathstat.dal.ca
Wed Sep 5 02:37:33 UTC 2007


Arjen de Korte wrote:
> 
> Peter Selinger wrote:
> 
> >> It *is* a question of predictability. 
> > 
> > Of course it is. What I meant is: who cares about predictability if
> > your driver segfaults? That seems to me to be a more serious issue.
> 
> Maybe I'm just thick-headed, but I fail to see why the driver would
> segfault if the information in the report descriptor is wrong. It might
> try to read feature reports that no longer exist, but this doesn't lead
> to segfaults (I tried this a couple of weeks ago on my Evolution 650).
> Note that until r1080, there was a dangerous use of un-initialized data
> that could easily lead to segfaults, so make sure you use a recent
> version if you want to try this out.

It's true that reading nonexistent data might not cause a segfault.
However, reading data and misinterpreting it (because it happens to be
in a numbered report which exists in both the current device and the
previous one, but whose contents might be something totally different)
can lead to a system shutdown in the worst case. Similarly, writing
variables whose interpretation is unknown can mess up the UPS state.

-- Peter



More information about the Nut-upsdev mailing list