[Mesa-dev] [PATCH] pipe-loader: fix off-by one error
Tom Stellard
tom at stellard.net
Mon Nov 23 13:40:59 PST 2015
On Mon, Nov 23, 2015 at 09:37:51PM +0000, Emil Velikov wrote:
> With earlier commit we've dropped the manual iteration over the fixed
> size array and prepemtively set the variable storing the size, that is
> to be returned. Yet we forgot to adjust the comparison, as before we
> were comparing the index, now we're comparing the size.
>
> Fixes: ff9cd8a67ca "pipe-loader: directly use
> pipe_loader_sw_probe_null() at probe time"
> Cc: mesa-stable at lists.freedesktop.org
> Cc: Tom Stellard <thomas.stellard at amd.com>
> Reported-by: Tom Stellard <thomas.stellard at amd.com>
> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
Tested-by: Tom Stellard <thomas.stellard at amd.com>
> ---
> src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
> index 5539a73..091d4d6 100644
> --- a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
> +++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
> @@ -222,7 +222,7 @@ pipe_loader_sw_probe(struct pipe_loader_device **devs, int ndev)
> {
> int i = 1;
>
> - if (i < ndev) {
> + if (i <= ndev) {
> if (!pipe_loader_sw_probe_null(devs)) {
> i--;
> }
> --
> 2.6.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list