gcc/libiberty/testsuite
Geoffrey Keating 5165f1258b 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
2006-12-21 01:29:27 +00:00
..
Makefile.in --(top level)-------------------------------------------- 2006-10-10 16:48:09 -07:00
demangle-expected cp-demangle.h: Add comment explaining what to do to avoid overrunning string. 2006-12-21 01:29:27 +00:00
test-demangle.c cp-demangle.h: Add comment explaining what to do to avoid overrunning string. 2006-12-21 01:29:27 +00:00
test-expandargv.c Makefile.in: Add test-expandargv test. 2006-01-20 22:55:36 +00:00
test-pexecute.c strverscmp.c: Update FSF address. 2005-08-17 03:31:04 +00:00