| Summary: | console_wmain doesn't null terminate the argv array | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Simon Hug <chli.hug> |
| Component: | main | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | sezeroz |
| Version: | HG 2.0 | ||
| Hardware: | All | ||
| OS: | Windows (All) | ||
| Attachments: | Patch that null terminates the argv array in console_wmain. | ||
Fixed, thanks! https://hg.libsdl.org/SDL/rev/db023d8a1c8b |
Created attachment 2458 [details] Patch that null terminates the argv array in console_wmain. The function console_wmain in src/main/windows/SDL_windows_main.c does not null terminate the argument list it is creating. As specified by the C standard, "argv[argc] shall be a null pointer." The SDLTest framework makes use of that null pointer and some test programs can cause an access violation because it's missing. The attached patch adds the missing NULL.