| Summary: | Array w going out of boundary in read_config_file function | ||
|---|---|---|---|
| Product: | SDL_mixer | Reporter: | Nitz <nitin.j4> |
| Component: | misc | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED DUPLICATE | QA Contact: | Sam Lantinga <slouken> |
| Severity: | critical | ||
| Priority: | P2 | CC: | sezeroz |
| Version: | 1.2.12 | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
This is a dup of #2872 (and #2966) |
In static int read_config_file(const char *name) function array going out of boundary at : while (w[words] && (words < MAXWORDS)) { w[++words]=strtok(0," \t\r\n\240"); if (w[words] && w[words][0]=='#') break; } here w[++words] will go out of boundary when words = MAXWORDS So to avoid this, fix should be: while (w[words] && (++words < MAXWORDS)) { w[words]=strtok(0," \t\r\n\240"); if (w[words] && w[words][0]=='#') break; } Thanks...