On 29 April 2015 at 19:02, Matteo Bruni matteo.mystral@gmail.com wrote:
Essentially it crashes in shader_vaddline() as soon as we have to resize the buffer because vsnprintf() tries to use "args" for a second time.
Oops. I guess this really got broken with cf12f51b1520546dc855e8e8e43135a06e7a0cbf already, but the larger initial buffer size made it work most of the time.
I attached a fix. Henri, is something like that okay with you?
In principle, but I think va_copy() is C99; I'm not sure we can rely on it being present. Since shader_vaddline() only has a couple of callers, it may be better to just move the resizing code into a helper function and use that from the callers.