Page 1 of 1

Segfault on opening password protected network stream

Posted: 29 Sep 2024 15:12
by hilios
Hello all,

I recently ran into a problem where vlc would segfault when trying to stream a file from a server requiring http authentication.

Root cause was a matching entry in libsecret (for the root directory of the server) containing a zero length secret.
This causes an underflow of p_entry->i_secret_len in keystore.c:332
if (!p_entry || p_entry->p_secret[p_entry->i_secret_len - 1] != '\0')

I changed the entry in libsecret so I'm no longer affected, just wanted to report this.
Maybe a check could be added to this line or entries with zero length secrets could be disregarded in find_closest_path.

Thanks for VLC and have a nice day