Skip to main content
summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorEugene Tarassov2011-11-21 14:06:11 -0500
committerEugene Tarassov2011-11-21 14:06:11 -0500
commiteabf773a94939b9ad518dc1ff2118b27b8ec05eb (patch)
treef7fbbb6550484f73b094be1e4630f5514a2ae98e /server
parente29c2d7033af4b1664348f13e7659decb328ffde (diff)
downloadorg.eclipse.tcf.agent-eabf773a94939b9ad518dc1ff2118b27b8ec05eb.tar.gz
org.eclipse.tcf.agent-eabf773a94939b9ad518dc1ff2118b27b8ec05eb.tar.xz
org.eclipse.tcf.agent-eabf773a94939b9ad518dc1ff2118b27b8ec05eb.zip
TCF Server: fixed segmentation fault when a client sets invalid path mapping.
Diffstat (limited to 'server')
-rw-r--r--server/tcf/services/context-proxy.c3
1 files changed, 2 insertions, 1 deletions
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