Browse code

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>

Mariusz SzczepaƄczyk authored on 2015/06/23 10:04:20
Showing 1 changed files
... ...
@@ -204,6 +204,9 @@ static av_cold int libssh_connect(URLContext *h, const char *url, char *path, si
204 204
                  path, path_size,
205 205
                  url);
206 206
 
207
+    if (!(*path))
208
+        av_strlcpy(path, "/", path_size);
209
+
207 210
     // a port of 0 will use a port from ~/.ssh/config or the default value 22
208 211
     if (port < 0 || port > 65535)
209 212
         port = 0;