Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for byte-like objects as input value in pybddisasm. #20

Merged
merged 3 commits into from
Aug 13, 2020

Conversation

akisari
Copy link
Contributor

@akisari akisari commented Aug 13, 2020

No description provided.

return view->buf;
}

buffer = (char *)malloc(sizeof(char) * view->len);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is sizeof(char) really necessary?

@@ -967,18 +967,60 @@ static uint8_t _pybddisasm_py_stack_to_disasm(uint8_t stack)
}


static char * _pybddisasm_get_contiguous_buffer(Py_buffer *view)
Copy link
Collaborator

Choose a reason for hiding this comment

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

The * should be placed near the function name.

if (PyBuffer_ToContiguous(buffer, view, view->len, 'C') < 0)
{
PyErr_SetString(PyExc_ValueError, "PyBuffer_ToContiguous failed!");
free (buffer);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Extra space after free.

Copy link
Collaborator

@vlutas vlutas left a comment

Choose a reason for hiding this comment

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

Some coding style comments only.

@vlutas vlutas merged commit 65d6f52 into bitdefender:master Aug 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants