mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 17:05:46 +00:00
- Fail if From is NULL
- Fixes Coverity error 652 svn path=/branches/aicom-network-fixes/; revision=36524
This commit is contained in:
parent
975e8109a2
commit
d8398cc719
1 changed files with 5 additions and 8 deletions
|
@ -194,6 +194,8 @@ TdiBuildConnectionInfoPair
|
|||
ULONG TdiAddressSize;
|
||||
PTDI_CONNECTION_INFORMATION FromTdiConn, ToTdiConn;
|
||||
|
||||
if (!From) return STATUS_INVALID_PARAMETER;
|
||||
|
||||
/* FIXME: Get from socket information */
|
||||
TdiAddressSize = TdiAddressSizeFromType(From->Address[0].AddressType);
|
||||
SizeOfEntry = TdiAddressSize + sizeof(TDI_CONNECTION_INFORMATION);
|
||||
|
@ -210,12 +212,7 @@ TdiBuildConnectionInfoPair
|
|||
FromTdiConn = (PTDI_CONNECTION_INFORMATION)LayoutFrame;
|
||||
ToTdiConn = (PTDI_CONNECTION_INFORMATION)LayoutFrame + SizeOfEntry;
|
||||
|
||||
if (From != NULL) {
|
||||
TdiBuildConnectionInfoInPlace( FromTdiConn, From );
|
||||
} else {
|
||||
TdiBuildNullConnectionInfoInPlace( FromTdiConn,
|
||||
From->Address[0].AddressType );
|
||||
}
|
||||
|
||||
TdiBuildConnectionInfoInPlace( ToTdiConn, To );
|
||||
|
||||
|
|
Loading…
Reference in a new issue