1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-08 20:06:18 +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:
Ken Thomases 2020-09-09 14:21:49 -05:00 committed by Alexandre Julliard
parent c7a0d5f626
commit 7e312c346c

View File

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