diff options
author | Geoffrey Keating <geoffk@apple.com> | 2006-12-21 01:29:27 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@gcc.gnu.org> | 2006-12-21 01:29:27 +0000 |
commit | 5165f1258bb2b110382156d62f46627e3e81654c (patch) | |
tree | 8bbefa55fbcb69174085aaec3d70bd9faf6d986a /gcc/fortran/trans-decl.c | |
parent | ad338ade26ba9eefa5aad0ded33e26c3feeb8b8e (diff) | |
download | gcc-5165f1258bb2b110382156d62f46627e3e81654c.zip gcc-5165f1258bb2b110382156d62f46627e3e81654c.tar.gz gcc-5165f1258bb2b110382156d62f46627e3e81654c.tar.bz2 |
cp-demangle.h: Add comment explaining what to do to avoid overrunning string.
* cp-demangle.h: Add comment explaining what to do to avoid
overrunning string.
(d_check_char): New.
(d_next_char): Don't advance past trailing '\0'.
* cp-demangle.c (cplus_demangle_mangled_name): Use d_check_char.
(d_nested_name): Likewise.
(d_special_name): Likewise.
(d_call_offset): Likewise.
(d_function_type): Likewise.
(d_array_type): Likewise.
(d_pointer_to_member_type): Likewise.
(d_template_param): Likewise.
(d_template_args): Likewise.
(d_template_arg): Likewise.
(d_expr_primary): Likewise.
(d_local_name): Likewise.
(d_substitution): Likewise.
(d_ctor_dtor_name): Use d_advance rather than d_next_char.
* testsuite/test-demangle.c: Include sys/mman.h.
(MAP_ANONYMOUS): Define.
(protect_end): New.
(main): Use protect_end.
* testsuite/demangle-expected: Add testcases for overrunning
the end of the string.
From-SVN: r120097
Diffstat (limited to 'gcc/fortran/trans-decl.c')
0 files changed, 0 insertions, 0 deletions