Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Don't overwrite BufferErrors when converting to BLOB
  • Loading branch information
Erlend E. Aasland committed Aug 9, 2021
commit aa755d23e3516e842ab99de08db36af4b267a168
2 changes: 0 additions & 2 deletions Modules/_sqlite/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,6 @@ _pysqlite_set_result(sqlite3_context* context, PyObject* py_val)
} else if (PyObject_CheckBuffer(py_val)) {
Py_buffer view;
if (PyObject_GetBuffer(py_val, &view, PyBUF_SIMPLE) != 0) {
PyErr_SetString(PyExc_ValueError,
Comment thread
erlend-aasland marked this conversation as resolved.
"could not convert BLOB to buffer");
return -1;
}
if (view.len > INT_MAX) {
Expand Down
1 change: 0 additions & 1 deletion Modules/_sqlite/statement.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ int pysqlite_statement_bind_parameter(pysqlite_Statement* self, int pos, PyObjec
case TYPE_BUFFER: {
Py_buffer view;
if (PyObject_GetBuffer(parameter, &view, PyBUF_SIMPLE) != 0) {
PyErr_SetString(PyExc_ValueError, "could not convert BLOB to buffer");
return -1;
}
if (view.len > INT_MAX) {
Expand Down