Commit 7e312c34 authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard

mountmgr: Avoid operating on a null CFStringRef, which would crash.

parent c7a0d5f6
......@@ -298,7 +298,7 @@ static CFStringRef find_service_id( const WCHAR *adapter )
service = CFArrayGetValueAtIndex( services, i );
name = SCNetworkInterfaceGetBSDName( SCNetworkServiceGetInterface(service) );
if (CFStringGetLength( name ) < ARRAY_SIZE( buf ))
if (name && CFStringGetLength( name ) < ARRAY_SIZE( buf ))
{
CFStringGetCharacters( name, CFRangeMake(0, CFStringGetLength(name)), buf );
if (!lstrcmpW( buf, unix_name ) && (id = SCNetworkServiceGetServiceID( service )))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment