OSDN Git Service

glsl: fix heap-buffer-overflow
authorBartosz Tomczyk <bartosz.tomczyk86@gmail.com>
Tue, 31 Jan 2017 11:02:20 +0000 (12:02 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 3 Feb 2017 11:08:59 +0000 (11:08 +0000)
commitca222b7c1868491ede19f2da717b39c0a54e6846
tree684d075ca65beda8bcc252b0bb016185698b0840
parent6c89a728d9e5d072cb504453e73077564c6523d3
glsl: fix heap-buffer-overflow

The `end+1` skips the ']', whereas the `strlen+1` includes the final
'\0' in the move to terminate the string.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
(cherry picked from commit fc27181f9e51441a26b7eb4f62794b5e9a994644)
src/compiler/glsl/link_uniforms.cpp