tanoku/sundown — Issue #78: bufprintf/vbufprintf corruption issue
Author: andre-d
Created: 2011-11-01 11:10:34+00:00
State: open

Related to: https://github.com/spladug/snudown/issues/1

In the event of the need to grow the buffer during vbufprintf, a corruption issue exists in the argument list. The state of an argument list after a call to vsnprintf is undefined. In the event of a buffer growth being needed, vbufprintf gets called again. However, this call is made without initing the argument list again. (va_start() must be called again). In the issue linked a test case can be seen to reliably reproduce (on 32bit linux).

a5269f9140502909094cb1bef96c977643ff4420 is a patch to correct the issue