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

sscanf buffer overflow #1087

Closed
setharnold opened this issue Feb 22, 2018 · 0 comments
Closed

sscanf buffer overflow #1087

setharnold opened this issue Feb 22, 2018 · 0 comments
Labels
removed_components Issues that affect MJ2, JPWL or JP3D wontfix

Comments

@setharnold
Copy link
Contributor

sscanf(line, "%*s %*s%*[ \t]%s", filename);

        } else if (strncmp(line, "File", 4) == 0) {
            sscanf(line, "%*s %*s%*[ \t]%s", filename);
            strcat(dirpath, filename);
            strcpy(filename, dirpath);

Hello, I believe the sscanf(3) here can overflow filename, and suspect the next two lines may also cause overflows with sufficiently malicious inputs.

Thanks

@rouault rouault closed this as completed May 6, 2021
@rouault rouault added wontfix removed_components Issues that affect MJ2, JPWL or JP3D labels May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
removed_components Issues that affect MJ2, JPWL or JP3D wontfix
Projects
None yet
Development

No branches or pull requests

2 participants