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

Commitf6c8007

Browse files
ZackerySpytzmiss-islington
authored andcommitted
bpo-34770: Fix a possible null pointer dereference in pyshellext.cpp (GH-9497)
The GlobalLock() call in UpdateDropDescription() was not checked forfailure.https://bugs.python.org/issue34770
1 parentb60b468 commitf6c8007

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix a possible null pointer dereference in pyshellext.cpp.

‎PC/pyshellext.cpp‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,11 @@ class PyShellExt : public RuntimeClass<
172172
return E_FAIL;
173173
}
174174
auto dd = (DROPDESCRIPTION*)GlobalLock(medium.hGlobal);
175+
if (!dd) {
176+
OutputDebugString(L"PyShellExt::UpdateDropDescription - failed to lock DROPDESCRIPTION hGlobal");
177+
ReleaseStgMedium(&medium);
178+
return E_FAIL;
179+
}
175180
StringCchCopy(dd->szMessage,sizeof(dd->szMessage) /sizeof(dd->szMessage[0]), DRAG_MESSAGE);
176181
StringCchCopy(dd->szInsert,sizeof(dd->szInsert) /sizeof(dd->szInsert[0]),PathFindFileNameW(target));
177182
dd->type = DROPIMAGE_MOVE;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2026 Movatter.jp