Skip to content

Commit 50ccf9c

Browse files
pierreluctgdrebbe-intrepid
authored andcommitted
Py_BuildValue with format "s" take in a const char *
In some cases, this can cause a segmentation fault
1 parent 0cd788c commit 50ccf9c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/methods.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4138,7 +4138,7 @@ PyObject* meth_get_library_path(PyObject* self)
41384138
char buffer[512];
41394139
return set_ics_exception(exception_runtime_error(), dll_get_error(buffer));
41404140
}
4141-
return Py_BuildValue("s", lib->getPath());
4141+
return Py_BuildValue("s", lib->getPath().c_str());
41424142
}
41434143
catch (ice::Exception& ex)
41444144
{

0 commit comments

Comments
 (0)