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

Commitb85104b

Browse files
lostmsufilmor
authored andcommitted
Fixed crash due to unnecessary decref of a borrowed reference in params array handling (#1163)
1 parent8e8f205 commitb85104b

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

‎CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
1313

1414
###Fixed
1515

16-
- Fix incorrect dereference of wrapper object in tp_repr, which may result in a program crash
16+
- Fix incorrect dereference of wrapper object in`tp_repr`, which may result in a program crash
17+
- Fix incorrect dereference in params array handling
1718

1819
##[2.5.0][] - 2020-06-14
1920

‎src/runtime/methodbinder.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ internal Binding Bind(IntPtr inst, IntPtr args, IntPtr kw, MethodBase info, Meth
372372
staticIntPtrHandleParamsArray(IntPtrargs,intarrayStart,intpyArgCount,outboolisNewReference)
373373
{
374374
isNewReference=false;
375-
IntPtrop;
375+
IntPtrop;
376376
// for a params method, we may have a sequence or single/multiple items
377377
// here we look to see if the item at the paramIndex is there or not
378378
// and then if it is a sequence itself.
@@ -390,10 +390,6 @@ static IntPtr HandleParamsArray(IntPtr args, int arrayStart, int pyArgCount, out
390390
{
391391
isNewReference=true;
392392
op=Runtime.PyTuple_GetSlice(args,arrayStart,pyArgCount);
393-
if(item!=IntPtr.Zero)
394-
{
395-
Runtime.XDecref(item);
396-
}
397393
}
398394
}
399395
else

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp