Re: [Spice-devel] [linux-agent v3 2/4] x11-randr: Improve argument check

2018-12-19 Thread Victor Toso
Hi, On Wed, Dec 19, 2018 at 09:47:14AM -0500, Frediano Ziglio wrote: > > > > From: Victor Toso > > > > In the current code, output should never be negative but the check > > exists after we use the variable as index. Make the check earlier. > > > > This patch also breaks the check in two in or

Re: [Spice-devel] [linux-agent v3 2/4] x11-randr: Improve argument check

2018-12-19 Thread Frediano Ziglio
> > From: Victor Toso > > In the current code, output should never be negative but the check > exists after we use the variable as index. Make the check earlier. > > This patch also breaks the check in two in order to provide more > accurate error log. > > Found by coverity: > | check_after_

[Spice-devel] [linux-agent v3 2/4] x11-randr: Improve argument check

2018-12-19 Thread Victor Toso
From: Victor Toso In the current code, output should never be negative but the check exists after we use the variable as index. Make the check earlier. This patch also breaks the check in two in order to provide more accurate error log. Found by coverity: | check_after_sink: You might be usin