Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'agent/tcf/services/pathmap.c')
-rw-r--r--agent/tcf/services/pathmap.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/agent/tcf/services/pathmap.c b/agent/tcf/services/pathmap.c
index b3281c4a..bc8c020b 100644
--- a/agent/tcf/services/pathmap.c
+++ b/agent/tcf/services/pathmap.c
@@ -46,10 +46,13 @@ char * canonic_path_map_file_name(const char * fnm) {
if (buf_pos > 0 && *fnm == '.' && (fnm[1] == '/' || fnm[1] == '\\')) {
unsigned j = buf_pos - 1;
if (j > 0 && buf[j - 1] != '/') {
+ buf[buf_pos] = 0;
while (j > 0 && buf[j - 1] != '/') j--;
- buf_pos = j;
- fnm += 2;
- continue;
+ if (strcmp(buf + j, "./") && strcmp(buf + j, "../")) {
+ buf_pos = j;
+ fnm += 2;
+ continue;
+ }
}
}
}

Back to the top