[Piglit] [PATCH] texwrap: Fix out-of-bounds read.

Brian Paul brianp at vmware.com
Thu Jan 24 06:49:59 PST 2013


On 01/23/2013 11:57 PM, Vinson Lee wrote:
> Fixes out-of-bounds read defect reported by Coverity.
>
> Signed-off-by: Vinson Lee<vlee at freedesktop.org>
> ---
>   tests/texturing/texwrap.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/texturing/texwrap.c b/tests/texturing/texwrap.c
> index 0a460d9..5ef33ee 100644
> --- a/tests/texturing/texwrap.c
> +++ b/tests/texturing/texwrap.c
> @@ -1279,7 +1279,7 @@ static void get_int_border_color(const struct format_desc *format,
>   			uresult[i] = border[i] * (double)((1ull<<  bits)-1);
>   		}
>   		if (bits == 10) {
> -			uresult[3] = border[i] * (double)3;
> +			uresult[3] = border[3] * (double)3;
>   		}
>   	}
>   }

Reviewed-by: Brian Paul <brianp at vmware.com>


More information about the Piglit mailing list