Introduction
Introduction Statistics Contact Development Disclaimer Help
Save finding a realpath on various item types with different semantics. - geomy…
git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfri…
Log
Files
Refs
Tags
README
LICENSE
---
commit 44bcfd8e6f0ce9919b41fba0b2245660780d2224
parent dd5de127a721468b97bc4b7741cdb76f17812b8a
Author: Christoph Lohmann <[email protected]>
Date: Mon, 3 Sep 2018 21:57:09 +0200
Save finding a realpath on various item types with different semantics.
Thanks Evil_Bob for pointing this out!
Diffstat:
M ind.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
---
diff --git a/ind.c b/ind.c
@@ -422,7 +422,20 @@ printelem(int fd, Elems *el, char *file, char *base, char …
free(el->e[4]);
el->e[4] = xstrdup(port);
}
- if (el->e[2][0] != '/' && !strncmp(el->e[2], "URL:", 4)) {
+
+ /*
+ * Ignore if the path is from base, if it might be some h type with
+ * some URL and ignore various types that have different semantics but
+ * to point to some file or directory.
+ */
+ if (el->e[2][0] != '/'
+ && strncmp(el->e[2], "URL:", 4)
+ && el->e[0][0] != 'i'
+ && el->e[0][0] != '2'
+ && el->e[0][0] != '3'
+ && el->e[0][0] != '8'
+ && el->e[0][0] != 'w'
+ && el->e[0][0] != 'T') {
path = file + strlen(base);
if ((p = strrchr(path, '/')))
len = p - path;
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.