diff --git a/sys/dvb/camswclient.c b/sys/dvb/camswclient.c index 32c6a221ec..ef381e42d4 100644 --- a/sys/dvb/camswclient.c +++ b/sys/dvb/camswclient.c @@ -77,6 +77,7 @@ cam_sw_client_open (CamSwClient * client, const char *sock_path) g_return_val_if_fail (client != NULL, FALSE); g_return_val_if_fail (client->state == CAM_SW_CLIENT_STATE_CLOSED, FALSE); g_return_val_if_fail (sock_path != NULL, FALSE); + g_return_val_if_fail (strlen (sock_path) >= sizeof (addr.sun_path)); addr.sun_family = AF_UNIX; strncpy (addr.sun_path, sock_path, sizeof (addr.sun_path));