| Summary: | Memory corruption in read_config_file() function | ||
|---|---|---|---|
| Product: | SDL_mixer | Reporter: | Nitz <nitin.j4> |
| Component: | misc | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | critical | ||
| Priority: | P2 | CC: | sezeroz |
| Version: | unspecified | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
| Attachments: | Patch is attached regarding memory corruption | ||
This is a dup of #2872 *** Bug 2872 has been marked as a duplicate of this bug. *** *** Bug 2315 has been marked as a duplicate of this bug. *** This is fixed, thanks! |
Created attachment 2141 [details] Patch is attached regarding memory corruption #define MAXWORDS 10 In read_config_file() function: char tmp[PATH_MAX], *w[MAXWORDS], *cp; while (w[words] && (words < MAXWORDS)) { w[++words]=strtok(0," \t\r\n\240"); if (w[words] && w[words][0]=='#') break; } Overrunning of array w happen at the index of 10. Patch is attached for solution. Thanks!!!