[Piglit] [PATCH] gl-3.0-bound-resource-limits: Fix potential strncat overflow.
Anuj Phogat
anuj.phogat at gmail.com
Tue Jan 20 14:25:35 PST 2015
On Mon, Jan 19, 2015 at 1:23 PM, Vinson Lee <vlee at freedesktop.org> wrote:
> Fix out-of-bounds access defect reported by Coverity.
>
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
> tests/spec/gl-3.0/bound-resource-limits.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/spec/gl-3.0/bound-resource-limits.c b/tests/spec/gl-3.0/bound-resource-limits.c
> index 1e5cf41..64533a0 100644
> --- a/tests/spec/gl-3.0/bound-resource-limits.c
> +++ b/tests/spec/gl-3.0/bound-resource-limits.c
> @@ -595,7 +595,7 @@ build_reduce_glsl_shader(const PackedDesc *packedInput,
> return false;
> }
>
> - shaderTextFree = MAX_SHADER_TEXT_CHARS;
> + shaderTextFree = MAX_SHADER_TEXT_CHARS - 1;
>
> snprintf(shaderTempText[0], MAX_SHADER_LINE_CHARS,
> "%s\n", GLSL_VERSION);
> --
> 2.2.1
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>
More information about the Piglit
mailing list