diff options
author | Mariusz SzczepaĆczyk <mszczepanczyk@gmail.com> | 2015-06-23 03:04:20 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-06-24 00:43:17 +0200 |
commit | 0cce94fb1037d0866dd6e5c2d980eacf0b15bcdc (patch) | |
tree | ecc547844f3b28c2d76c5f19a7fc0706e54acd0b /libavformat | |
parent | e96f0a692b3c0ab2df38c6a147bc9d20bf2676c0 (diff) | |
download | ffmpeg-0cce94fb1037d0866dd6e5c2d980eacf0b15bcdc.tar.gz |
lavf/libssh: read empty path from url as /
Reviewed-by: Lukasz Marek <lukasz.m.luki2 at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/libssh.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/libssh.c b/libavformat/libssh.c index 256e4da9bc..ee429241c0 100644 --- a/libavformat/libssh.c +++ b/libavformat/libssh.c @@ -204,6 +204,9 @@ static av_cold int libssh_connect(URLContext *h, const char *url, char *path, si path, path_size, url); + if (!(*path)) + av_strlcpy(path, "/", path_size); + // a port of 0 will use a port from ~/.ssh/config or the default value 22 if (port < 0 || port > 65535) port = 0; |