diff options
Diffstat (limited to 'gcc/objc')
-rw-r--r-- | gcc/objc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/objc/objc-encoding.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog index 7d86592..f87294b 100644 --- a/gcc/objc/ChangeLog +++ b/gcc/objc/ChangeLog @@ -1,3 +1,8 @@ +2017-11-10 Martin Sebor <msebor@redhat.com> + + PR c/81117 + * objc-encoding.c (encode_type): Use memcpy instead of strncpy. + 2017-10-31 David Malcolm <dmalcolm@redhat.com> * objc-gnu-runtime-abi-01.c (objc_gnu_runtime_abi_01_init): Use diff --git a/gcc/objc/objc-encoding.c b/gcc/objc/objc-encoding.c index 9f46d57..f9d8d47 100644 --- a/gcc/objc/objc-encoding.c +++ b/gcc/objc/objc-encoding.c @@ -734,7 +734,7 @@ encode_type (tree type, int curtype, int format) /* Rewrite "in const" from "nr" to "rn". */ if (curtype >= 1 && !strncmp (enc - 1, "nr", 2)) - strncpy (enc - 1, "rn", 2); + memcpy (enc - 1, "rn", 2); } } } |