Re: [Spice-devel] [PATCH spice-server 1/2] stat-file: Fix off by one buffer overflow

2017-02-03 Thread Frediano Ziglio
> > On Thu, 2017-02-02 at 10:52 -0600, Jonathon Jongsma wrote: > > Acked-by: Jonathon Jongsma > > > > Out of curiosity, how did you find it? Just reading code? > > Nevermind. I see that the next patch is addressing a compiler warning > in this code, so you were obviously looking closely at this

Re: [Spice-devel] [PATCH spice-server 1/2] stat-file: Fix off by one buffer overflow

2017-02-02 Thread Jonathon Jongsma
On Thu, 2017-02-02 at 10:52 -0600, Jonathon Jongsma wrote: > Acked-by: Jonathon Jongsma > > Out of curiosity, how did you find it? Just reading code? Nevermind. I see that the next patch is addressing a compiler warning in this code, so you were obviously looking closely at this code for that re

Re: [Spice-devel] [PATCH spice-server 1/2] stat-file: Fix off by one buffer overflow

2017-02-02 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma Out of curiosity, how did you find it? Just reading code? On Thu, 2017-02-02 at 12:46 +, Frediano Ziglio wrote: > The stat file contains an array of max_nodes elements > so we must stay in [0, max_nodes) range, not [0, max_nodes]. > > There are no spice path tha

[Spice-devel] [PATCH spice-server 1/2] stat-file: Fix off by one buffer overflow

2017-02-02 Thread Frediano Ziglio
The stat file contains an array of max_nodes elements so we must stay in [0, max_nodes) range, not [0, max_nodes]. There are no spice path that lead to these overflows but it's better to have them fixed before creating one. Signed-off-by: Frediano Ziglio --- server/stat-file.c | 4 ++-- 1 file