diff options
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/dtrace-probe.c | 8 |
2 files changed, 14 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ce42136..67a61d8 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2015-08-07 Joel Brobecker <brobecker@adacore.com> + + * dtrace-probe.c (dtrace_process_dof): Ignore the objfile's DOF + data if a DTRACE_DOF_SECT_TYPE_PROVIDER section is found to be + smaller than expected. + 2015-08-07 Andrew Burgess <andrew.burgess@embecosm.com> * stack.c (get_frame_language): Moved ... diff --git a/gdb/dtrace-probe.c b/gdb/dtrace-probe.c index 3f2548d..9816f07 100644 --- a/gdb/dtrace-probe.c +++ b/gdb/dtrace-probe.c @@ -519,6 +519,14 @@ dtrace_process_dof (asection *sect, struct objfile *objfile, unsigned int entsize = DOF_UINT (dof, probes_s->dofs_entsize); int num_probes; + if (DOF_UINT (dof, section->dofs_size) + < sizeof (struct dtrace_dof_provider)) + { + /* The section is smaller than expected, so do not use it. + This has been observed on x86-solaris 10. */ + goto invalid_dof_data; + } + /* Very, unlikely, but could crash gdb if not handled properly. */ if (entsize == 0) |