gallium/tgsi: fix overflow in parse property
authorLi Qiang <liq3ea@gmail.com>
Tue, 10 Jan 2017 08:56:31 +0000 (03:56 -0500)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 11 Jan 2017 11:40:38 +0000 (12:40 +0100)
commit6205c533030687c9680f5175e8158060c6e24221
tree57b8f0eecd63aade93765b2945dd91de5f0e9f6e
parent2c0d849e2d2990c0122dfb161132558d971e77db
gallium/tgsi: fix overflow in parse property

In parse_identifier, it doesn't stop copying '*pcur'
untill encounter the NULL. As the 'ret' has a
fixed-size buffer, if the '*pcur' has a long string,
there will be a buffer overflow. This patch avoid this.

Signed-off-by: Li Qiang <liq3ea@gmail.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
src/gallium/auxiliary/tgsi/tgsi_text.c