In vcut.c submit_headers_to_stream, the following is done:
for(i=0;i<4;i++)
{
ogg_packet p;
if(i < 4) { /* a header packet */
take vs->headers[i]
} else {
take vs->last_packet
}
i < 4 is always true, so the else branch is never executed.
Also, vs->headers is declared as follow:
vcut_packet headers[3];
So, vs->headers[3] is out of range.
In vcut.c submit_headers_to_stream, the following is done:
i < 4 is always true, so the else branch is never executed. Also, vs->headers is declared as follow:
vcut_packet headers[3];
So, vs->headers[3] is out of range.