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
91ab3287
Commit
91ab3287
authored
Oct 19, 2020
by
Victor M. Alvarez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use boolean AND operator (&&) instead of bitwise operator (&).
parent
9dc95614
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
yara-python.c
yara-python.c
+7
-3
No files found.
yara-python.c
View file @
91ab3287
...
...
@@ -611,6 +611,7 @@ int yara_callback(
PyObject
*
module_data
;
PyObject
*
callback_result
;
PyObject
*
module_info_dict
;
int
which
=
((
CALLBACK_DATA
*
)
user_data
)
->
which
;
Py_ssize_t
data_size
;
...
...
@@ -2151,7 +2152,7 @@ static PyObject* yara_compile(
"compile() takes 1 argument"
);
}
if
(
warning_error
&
PyList_Size
(
warnings
)
>
0
)
if
(
warning_error
&
&
PyList_Size
(
warnings
)
>
0
)
{
PyErr_SetObject
(
YaraWarningError
,
warnings
);
}
...
...
@@ -2404,12 +2405,15 @@ MOD_INIT(yara)
YaraTimeoutError
=
PyErr_NewException
(
"yara.TimeoutError"
,
YaraError
,
NULL
);
YaraWarningError
=
PyErr_NewException
(
"yara.WarningError"
,
YaraError
,
NULL
);
PyTypeObject
*
YaraWarningError_type
=
(
PyTypeObject
*
)
YaraWarningError
;
PyTypeObject
*
YaraWarningError_type
=
(
PyTypeObject
*
)
YaraWarningError
;
PyObject
*
descr
=
PyDescr_NewGetSet
(
YaraWarningError_type
,
YaraWarningError_getsetters
);
if
(
PyDict_SetItem
(
YaraWarningError_type
->
tp_dict
,
PyDescr_NAME
(
descr
),
descr
)
<
0
)
{
if
(
PyDict_SetItem
(
YaraWarningError_type
->
tp_dict
,
PyDescr_NAME
(
descr
),
descr
)
<
0
)
{
Py_DECREF
(
m
);
Py_DECREF
(
descr
);
}
Py_DECREF
(
descr
);
#else
YaraError
=
Py_BuildValue
(
"s"
,
"yara.Error"
);
...
...
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