Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect check in vcut.c and possible out-of-range array index #24

Open
Alpt opened this issue Apr 16, 2020 · 1 comment
Open

Incorrect check in vcut.c and possible out-of-range array index #24

Alpt opened this issue Apr 16, 2020 · 1 comment

Comments

@Alpt
Copy link

Alpt commented Apr 16, 2020

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.

@Alpt
Copy link
Author

Alpt commented Apr 17, 2020

This issue was already mentioned in pull request #23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant