Fixed NULL dereferences and uninitialized values
This commit is contained in:
parent
2a582ed197
commit
ef1728faf5
@ -279,7 +279,7 @@ static DWORD WINAPI audin_oss_thread_func(LPVOID arg)
|
||||
|
||||
err_out:
|
||||
|
||||
if (error && oss->rdpcontext)
|
||||
if (error && oss && oss->rdpcontext)
|
||||
setChannelError(oss->rdpcontext, error,
|
||||
"audin_oss_thread_func reported an error");
|
||||
|
||||
|
@ -161,7 +161,7 @@ LONG smartcard_pack_write_size_align(SMARTCARD_DEVICE* smartcard, wStream* s, UI
|
||||
SCARDCONTEXT smartcard_scard_context_native_from_redir(SMARTCARD_DEVICE* smartcard,
|
||||
REDIR_SCARDCONTEXT* context)
|
||||
{
|
||||
SCARDCONTEXT hContext = 0;
|
||||
SCARDCONTEXT hContext = { 0 };
|
||||
|
||||
if ((context->cbContext != sizeof(ULONG_PTR)) && (context->cbContext != 0))
|
||||
{
|
||||
@ -173,8 +173,6 @@ SCARDCONTEXT smartcard_scard_context_native_from_redir(SMARTCARD_DEVICE* smartca
|
||||
|
||||
if (context->cbContext)
|
||||
CopyMemory(&hContext, &(context->pbContext), context->cbContext);
|
||||
else
|
||||
ZeroMemory(&hContext, sizeof(ULONG_PTR));
|
||||
|
||||
return hContext;
|
||||
}
|
||||
|
@ -1387,7 +1387,7 @@ static int libusb_udev_isoch_transfer(IUDEVICE* idev, UINT32 RequestId, UINT32 E
|
||||
if (iso_transfer == NULL)
|
||||
{
|
||||
WLog_ERR(TAG, "Error: libusb_alloc_transfer.");
|
||||
status = -1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/** process URB_FUNCTION_IOSCH_TRANSFER */
|
||||
|
Loading…
Reference in New Issue
Block a user