]> granicus.if.org Git - transmission/commitdiff
(trunk, libT) #5517 'fix error adding torrents whose names with an ellipsis' -- fix...
authorJordan Lee <jordan@transmissionbt.com>
Sun, 19 Jan 2014 04:19:14 +0000 (04:19 +0000)
committerJordan Lee <jordan@transmissionbt.com>
Sun, 19 Jan 2014 04:19:14 +0000 (04:19 +0000)
libtransmission/metainfo.c

index e42eef0309f28ca5c5e5e245840e9fa9ae87c186..5d7c053b49e17bbb2a000d04c5668cc461ccc5ad 100644 (file)
@@ -63,7 +63,8 @@ static bool
 path_is_suspicious (const char * path)
 {
   return (path == NULL)
-      || (strstr (path, "../") != NULL);
+      || (!strncmp (path, "../", 3))
+      || (strstr (path, "/../") != NULL);
 }
 
 static bool