We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d4e3d4e commit f35ee01Copy full SHA for f35ee01
doc/libogg/oggpack_writeinit.html
@@ -39,8 +39,10 @@ <h3>Parameters</h3>
39
40
<h3>Return Values</h3>
41
<blockquote>
42
-<li>
43
-No values are returned.</li>
+<p>No values are returned. If initialization fail, the buffer is
+ unusable and calls to
44
+ <a href="oggpack_writecheck.html">oggpack_writecheck()</a> will
45
+ report the error.</p>
46
</blockquote>
47
<p>
48
src/bitwise.c
@@ -39,6 +39,8 @@ static const unsigned int mask8B[]=
void oggpack_writeinit(oggpack_buffer *b){
memset(b,0,sizeof(*b));
b->ptr=b->buffer=_ogg_malloc(BUFFER_INCREMENT);
+ if (!b->buffer)
+ return;
b->buffer[0]='\0';
b->storage=BUFFER_INCREMENT;
}
0 commit comments