diff options
author | Martin Liska <mliska@suse.cz> | 2018-04-20 14:55:36 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2018-04-20 12:55:36 +0000 |
commit | fffefbf85f60859c21e6844aa06a0f6ce8cd1cdd (patch) | |
tree | 5e7eddf29b6683efa70112b67eaa7a5876271771 /gcc/objc/objc-act.c | |
parent | b46ebc6c45d7a74ec18a0644f8b4e3c66ea84fb8 (diff) | |
download | gcc-fffefbf85f60859c21e6844aa06a0f6ce8cd1cdd.zip gcc-fffefbf85f60859c21e6844aa06a0f6ce8cd1cdd.tar.gz gcc-fffefbf85f60859c21e6844aa06a0f6ce8cd1cdd.tar.bz2 |
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
Diffstat (limited to 'gcc/objc/objc-act.c')
-rw-r--r-- | gcc/objc/objc-act.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index b87f7cc..d086930 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -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)); |