Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2011-05-17 00:41:32 +0000
committereutarass2011-05-17 00:41:32 +0000
commiteb1f0b28c83839169ee27658759b2ef13f676224 (patch)
treecfb65cb79baf4789f82a44dbb7c6a68f75d48102
parent0787e4860ba8f8576dc5eefbee9c0dfc6a16bd99 (diff)
downloadorg.eclipse.tcf.agent-eb1f0b28c83839169ee27658759b2ef13f676224.tar.gz
org.eclipse.tcf.agent-eb1f0b28c83839169ee27658759b2ef13f676224.tar.xz
org.eclipse.tcf.agent-eb1f0b28c83839169ee27658759b2ef13f676224.zip
TCF Agent: fixed: invalid file name in MemoryMap.set command can cause null pointer dereference in the agent.
-rw-r--r--services/tcf_elf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/tcf_elf.c b/services/tcf_elf.c
index eebcb0b2..b3e5a9e7 100644
--- a/services/tcf_elf.c
+++ b/services/tcf_elf.c
@@ -702,7 +702,7 @@ static ELF_File * open_memory_region_file(MemoryRegion * r, int * error) {
if (r->dev != 0 && file->dev != r->dev) return NULL;
if (r->ino != 0 && file->ino != r->ino) return NULL;
if (file->error == NULL) return file;
- if (*error == 0) {
+ if (error != NULL && *error == 0) {
int no = set_error_report_errno(file->error);
if (get_error_code(no) != ERR_INV_FORMAT) *error = no;
}

Back to the top