Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yara-python
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-depend
yara-python
Commits
0dd0ed3f
Commit
0dd0ed3f
authored
Sep 15, 2023
by
Peter Stokes
Committed by
Victor M. Alvarez
Sep 15, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue #242 (#243)
Address incorrect reference counting.
parent
836fd9ea
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
yara-python.c
yara-python.c
+4
-0
No files found.
yara-python.c
View file @
0dd0ed3f
...
@@ -1884,6 +1884,7 @@ static void StringMatchInstance_dealloc(
...
@@ -1884,6 +1884,7 @@ static void StringMatchInstance_dealloc(
Py_DECREF
(
object
->
offset
);
Py_DECREF
(
object
->
offset
);
Py_DECREF
(
object
->
matched_data
);
Py_DECREF
(
object
->
matched_data
);
Py_DECREF
(
object
->
matched_length
);
Py_DECREF
(
object
->
xor_key
);
Py_DECREF
(
object
->
xor_key
);
PyObject_Del
(
self
);
PyObject_Del
(
self
);
...
@@ -1923,7 +1924,10 @@ static PyObject* StringMatchInstance_plaintext(
...
@@ -1923,7 +1924,10 @@ static PyObject* StringMatchInstance_plaintext(
StringMatchInstance
*
instance
=
(
StringMatchInstance
*
)
self
;
StringMatchInstance
*
instance
=
(
StringMatchInstance
*
)
self
;
uint64_t
xor_key
=
PyLong_AsUnsignedLongLong
(
instance
->
xor_key
);
uint64_t
xor_key
=
PyLong_AsUnsignedLongLong
(
instance
->
xor_key
);
if
(
xor_key
==
0
)
if
(
xor_key
==
0
)
{
Py_INCREF
(
instance
->
matched_data
);
return
instance
->
matched_data
;
return
instance
->
matched_data
;
}
int
result
=
PyBytes_AsStringAndSize
(
instance
->
matched_data
,
&
pb
,
&
length
);
int
result
=
PyBytes_AsStringAndSize
(
instance
->
matched_data
,
&
pb
,
&
length
);
if
(
result
==
-
1
)
if
(
result
==
-
1
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment