Commit fffefbf8 by Martin Liska Committed by Martin Liska

Do not overflow string buffer (PR objc/85476).

2018-04-20  Martin Liska  <mliska@suse.cz>

	PR objc/85476
	* objc-act.c (finish_class): Do not overflow string buffer.

From-SVN: r259521
parent b46ebc6c
2018-04-20 Martin Liska <mliska@suse.cz>
PR objc/85476
* objc-act.c (finish_class): Do not overflow string buffer.
2018-01-03 Jakub Jelinek <jakub@redhat.com>
Update copyright years.
......
......@@ -8003,7 +8003,7 @@ finish_class (tree klass)
char *setter_name = (char *) alloca (length);
tree ret_type, selector, arg_type, arg_name;
strcpy (setter_name, full_setter_name);
memcpy (setter_name, full_setter_name, length - 1);
setter_name[length - 1] = '\0';
ret_type = build_tree_list (NULL_TREE, void_type_node);
arg_type = build_tree_list (NULL_TREE, TREE_TYPE (x));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment