mirror of
git://sigrok.org/libserialport
synced 2023-08-10 21:13:24 +03:00
Fix a potential segfault in sp_get_port_handle().
This commit is contained in:
parent
eb50b1aca6
commit
5f64c28551
@ -234,6 +234,8 @@ SP_API enum sp_return sp_get_port_handle(const struct sp_port *port,
|
||||
|
||||
if (!port)
|
||||
RETURN_ERROR(SP_ERR_ARG, "Null port");
|
||||
if (!result_ptr)
|
||||
RETURN_ERROR(SP_ERR_ARG, "Null result pointer");
|
||||
|
||||
#ifdef _WIN32
|
||||
HANDLE *handle_ptr = result_ptr;
|
||||
|
Loading…
Reference in New Issue
Block a user