Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--agent/tcf/services/pathmap.c2
-rw-r--r--server/tcf/services/context-proxy.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/agent/tcf/services/pathmap.c b/agent/tcf/services/pathmap.c
index 769c3dec..ada31bb9 100644
--- a/agent/tcf/services/pathmap.c
+++ b/agent/tcf/services/pathmap.c
@@ -351,7 +351,7 @@ char * apply_path_map(Channel * c, Context * ctx, char * fnm, int mode) {
}
else {
PathMap * m = find_map(c);
- if (m == NULL) return NULL;
+ if (m == NULL) return fnm;
return map_file_name(ctx, m, fnm, mode);
}
return fnm;
diff --git a/server/tcf/services/context-proxy.c b/server/tcf/services/context-proxy.c
index cbbd2337..27c0f10d 100644
--- a/server/tcf/services/context-proxy.c
+++ b/server/tcf/services/context-proxy.c
@@ -992,7 +992,8 @@ static void read_memory_map_item(InputStream * inp, void * args) {
}
m = mem_buf + mem_buf_pos;
memset(m, 0, sizeof(MemoryRegion));
- if (json_read_struct(inp, read_memory_region_property, m) && m->file_name != NULL) {
+ if (json_read_struct(inp, read_memory_region_property, m) &&
+ m->file_name != NULL && m->file_name[0] != 0) {
struct stat buf;
char * fnm = apply_path_map(cache->peer->host, cache->ctx, m->file_name, PATH_MAP_TO_LOCAL);
if (fnm != m->file_name) {

Back to the top