Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bpo-34492: Python/coreconfig.c: Fix _Py_wstrlist_copy()#8910

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vstinner merged 2 commits intopython:masterfromizbyshev:bpo-34492
Aug 24, 2018

Conversation

@izbyshev
Copy link
Contributor

@izbyshevizbyshev commentedAug 24, 2018
edited
Loading

  • Add missing NULL check reported by Svace static analyzer.
  • Fix _Py_wstrlist_clear() call on a wrong list.

https://bugs.python.org/issue34492

wchar_t**list_copy=PyMem_RawMalloc(size);
if (list_copy==NULL) {
returnNULL;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

There is another bug below: _Py_wstrlist_clear(i, list), it should be list_copy, not list.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Fixed, thanks!

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phraseI have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@izbyshevizbyshev changed the titlebpo-34492: Python/coreconfig.c: Add missing NULL check to _Py_wstrlis…bpo-34492: Python/coreconfig.c: Fix _Py_wstrlist_copy()Aug 24, 2018
Copy link
Member

@vstinnervstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM.

@vstinnervstinner merged commiteb746db intopython:masterAug 24, 2018
@miss-islington
Copy link
Contributor

Thanks@izbyshev for the PR, and@vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry,@izbyshev and@vstinner, I could not cleanly backport this to3.7 due to a conflict.
Please backport usingcherry_picker on command line.
cherry_picker eb746dbae8b320758ee08f811316d7f283435cc0 3.7

@izbyshevizbyshev deleted the bpo-34492 branchAugust 24, 2018 23:38
izbyshev pushed a commit to izbyshev/cpython that referenced this pull requestAug 25, 2018
* Add missing NULL check reported by Svace static analyzer.* Fix clear_wstrlist() call on a wrong list.(cherry picked from commiteb746db)Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
@bedevere-bot
Copy link

GH-8922 is a backport of this pull request to the3.7 branch.

vstinner pushed a commit that referenced this pull requestAug 25, 2018
* Add missing NULL check reported by Svace static analyzer.* Fix clear_wstrlist() call on a wrong list.(cherry picked from commiteb746db)Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
CuriousLearner added a commit to CuriousLearner/cpython that referenced this pull requestAug 27, 2018
* master: (104 commits)  Fast path for exact floats in math.hypot() and math.dist() (pythonGH-8949)  Remove AIX workaround test_subprocess (pythonGH-8939)  bpo-34503: Fix refleak in PyErr_SetObject() (pythonGH-8934)  closes bpo-34504: Remove the useless NULL check in PySequence_Check(). (pythonGH-8935)  closes bpo-34501: PyType_FromSpecWithBases: Check spec->name before dereferencing it. (pythonGH-8930)  closes bpo-34502: Remove a note about utf8_mode from sys.exit() docs. (pythonGH-8928)  Remove unneeded PyErr_Clear() in _winapi_SetNamedPipeHandleState_impl() (pythonGH-8281)  Fix markup in stdtypes documentation (pythonGH-8905)  bpo-34395: Don't free allocated memory on realloc fail in load_mark() in _pickle.c. (pythonGH-8788)  Fix upsizing of marks stack in pickle module. (pythonGH-8860)  bpo-34171: Prevent creating Lib/trace.cover when run the trace module. (pythonGH-8841)  closes bpo-34493: Objects/genobject.c: Add missing NULL check to compute_cr_origin() (pythonGH-8911)  Fixed typo with asynccontextmanager code example (pythonGH-8845)  bpo-34426: fix typo (__lltrace__ -> __ltrace__) (pythonGH-8822)  bpo-13312: Avoid int underflow in time year. (pythonGH-8912)  bpo-34492: Python/coreconfig.c: Fix _Py_wstrlist_copy() (pythonGH-8910)  bpo-34448: Improve output of usable wchar_t check (pythonGH-8846)  closes bpo-34471: _datetime: Add missing NULL check to tzinfo_from_isoformat_results. (pythonGH-8869)  bpo-6700: Fix inspect.getsourcelines for module level frames/tracebacks (pythonGH-8864)  Fix typo in the dataclasses's doc (pythonGH-8896)  ...
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@vstinnervstinnervstinner approved these changes

Assignees

@vstinnervstinner

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@izbyshev@bedevere-bot@miss-islington@vstinner@the-knights-who-say-ni

[8]ページ先頭

©2009-2025 Movatter.jp