Re: [Piglit] [PATCH] util: fix off-by-one when loading source

2019-01-20 Thread Lionel Landwerlin
On 19/01/2019 23:49, Caio Marcelo de Oliveira Filho wrote: One extra character is leaking from the text into the copied line. The "+ 1" is an artifact from when malloc was used, strndup will add the extra '\0' after copying text_size bytes (if available). 7c8ee3f0f "util: simplify string duplica

[Piglit] [PATCH] util: fix off-by-one when loading source

2019-01-19 Thread Caio Marcelo de Oliveira Filho
One extra character is leaking from the text into the copied line. The "+ 1" is an artifact from when malloc was used, strndup will add the extra '\0' after copying text_size bytes (if available). 7c8ee3f0f "util: simplify string duplication logic" --- tests/util/piglit-shader-test.c | 2 +- 1 fi