[FFmpeg-cvslog] lavf/libssh: read empty path from url as /

Mariusz Szczepańczyk git at videolan.org
Wed Jun 24 00:51:40 CEST 2015


ffmpeg | branch: master | Mariusz Szczepańczyk <mszczepanczyk at gmail.com> | Tue Jun 23 03:04:20 2015 +0200| [0cce94fb1037d0866dd6e5c2d980eacf0b15bcdc] | committer: Michael Niedermayer

lavf/libssh: read empty path from url as /

Reviewed-by: Lukasz Marek <lukasz.m.luki2 at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0cce94fb1037d0866dd6e5c2d980eacf0b15bcdc
---

 libavformat/libssh.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/libssh.c b/libavformat/libssh.c
index 256e4da..ee42924 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;



More information about the ffmpeg-cvslog mailing list