mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 23:06:49 +00:00
dvb: reject too long socket paths
Coverity 206004
This commit is contained in:
parent
6e764e5b11
commit
dd77b7ad79
1 changed files with 1 additions and 0 deletions
|
@ -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 != NULL, FALSE);
|
||||||
g_return_val_if_fail (client->state == CAM_SW_CLIENT_STATE_CLOSED, 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 (sock_path != NULL, FALSE);
|
||||||
|
g_return_val_if_fail (strlen (sock_path) >= sizeof (addr.sun_path));
|
||||||
|
|
||||||
addr.sun_family = AF_UNIX;
|
addr.sun_family = AF_UNIX;
|
||||||
strncpy (addr.sun_path, sock_path, sizeof (addr.sun_path));
|
strncpy (addr.sun_path, sock_path, sizeof (addr.sun_path));
|
||||||
|
|
Loading…
Reference in a new issue