mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-21 15:54:09 +00:00
mountmgr: Avoid operating on a null CFStringRef, which would crash.
Signed-off-by: Ken Thomases <ken@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c7a0d5f626
commit
7e312c346c
|
@ -298,7 +298,7 @@ static CFStringRef find_service_id( const WCHAR *adapter )
|
||||||
|
|
||||||
service = CFArrayGetValueAtIndex( services, i );
|
service = CFArrayGetValueAtIndex( services, i );
|
||||||
name = SCNetworkInterfaceGetBSDName( SCNetworkServiceGetInterface(service) );
|
name = SCNetworkInterfaceGetBSDName( SCNetworkServiceGetInterface(service) );
|
||||||
if (CFStringGetLength( name ) < ARRAY_SIZE( buf ))
|
if (name && CFStringGetLength( name ) < ARRAY_SIZE( buf ))
|
||||||
{
|
{
|
||||||
CFStringGetCharacters( name, CFRangeMake(0, CFStringGetLength(name)), buf );
|
CFStringGetCharacters( name, CFRangeMake(0, CFStringGetLength(name)), buf );
|
||||||
if (!lstrcmpW( buf, unix_name ) && (id = SCNetworkServiceGetServiceID( service )))
|
if (!lstrcmpW( buf, unix_name ) && (id = SCNetworkServiceGetServiceID( service )))
|
||||||
|
|
Loading…
Reference in a new issue