]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
devstat_selectdevs: resize dev_select only after copying data out of it
authoravg <avg@FreeBSD.org>
Tue, 3 Dec 2019 09:48:43 +0000 (09:48 +0000)
committeravg <avg@FreeBSD.org>
Tue, 3 Dec 2019 09:48:43 +0000 (09:48 +0000)
commit06f034af5709d003d270b191a6988de2de2e50ab
treeb26d6ca33fdea3a3001ebb13fe78027fe66cf25e
parent5fe446669da969f3563964f2b38639d6887eb9ea
devstat_selectdevs: resize dev_select only after copying data out of it

The resizing could be a downsizing so some data would be lost and we
could attempt to read past the end of the new memory allocation.

MFC after: 2 weeks
Sponsored by: Panzura
lib/libdevstat/devstat.c