1
0
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:
Uwe Hermann 2015-04-30 22:38:58 +02:00
parent eb50b1aca6
commit 5f64c28551

View File

@ -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;