vsnprintf and NULL input string argument
<p>What is the expected behavior of <code>vsnprintf</code> when it has an input NULL string and/or size=0, e.g.</p>

<pre><code>vsnprintf(NULL, 0, "%d", p);
</code></pre>

<p>or</p>

<pre><code>vsnprintf(NULL, 10, "%d", p);
</code></pre>

<p>Is it undefined behavior or valid scenario? It doesn't crash with both input string as <code>NULL</code> and its length as <code>0</code>, and returns -1 (the same for valid non-NULL string and zero length), however it does crash the other way around (<code>NULL</code> input string and positive length).</p>