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

gh-83004: Harden msvcrt further #103420

Merged
merged 8 commits into from
Apr 19, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Adress review: Return -1 iso. goto error
  • Loading branch information
erlend-aasland committed Apr 18, 2023
commit 1f2162be5031851504b0c21fe7e6960f44aa030e
6 changes: 3 additions & 3 deletions PC/msvcrtmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -578,19 +578,19 @@ insertptr(PyObject *mod, char *name, void *value)

#define INSERTINT(MOD, NAME, VAL) do { \
if (PyModule_AddIntConstant(MOD, NAME, VAL) < 0) { \
goto error; \
return -1; \
} \
} while (0)

#define INSERTPTR(MOD, NAME, PTR) do { \
if (insertptr(MOD, NAME, PTR) < 0) { \
goto error; \
return -1; \
} \
} while (0)

#define INSERTSTR(MOD, NAME, CONST) do { \
if (PyModule_AddStringConstant(MOD, NAME, CONST) < 0) { \
goto error; \
return -1; \
} \
} while (0)

Expand Down