aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-01-19 03:18:50 +0000
committerRichard Stallman <rms@gnu.org>1993-01-19 03:18:50 +0000
commit51480b1e3e93316fff4c36709694b9e68d7881ff (patch)
tree3331dfa14e52883a1a4cd3c17dab7467f65e3142 /gcc
parentee40befe328bec580789418de44c8db43281ea7b (diff)
downloadgcc-51480b1e3e93316fff4c36709694b9e68d7881ff.zip
gcc-51480b1e3e93316fff4c36709694b9e68d7881ff.tar.gz
gcc-51480b1e3e93316fff4c36709694b9e68d7881ff.tar.bz2
(encode_method_def): Null-terminate encoding.
(build_ivar_list_initializer): Null-terminate type encoding. From-SVN: r3270
Diffstat (limited to 'gcc')
-rw-r--r--gcc/objc/objc-act.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index 6b3b074..255c14b 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -1825,6 +1825,7 @@ build_ivar_list_initializer (field_decl, size)
/* set type */
encode_field_decl (field_decl, OBJC_ENCODE_DONT_INLINE_DEFS);
+ obstack_1grow (&util_obstack, 0); /* null terminate string */
offset = add_objc_string (get_identifier (obstack_finish (&util_obstack)));
obstack_free (&util_obstack, util_firstobj);
@@ -4434,6 +4435,7 @@ encode_method_def (func_decl)
obstack_grow (&util_obstack, buffer, strlen (buffer));
}
+ obstack_1grow (&util_obstack, 0); /* null terminate string */
result = get_identifier (obstack_finish (&util_obstack));
obstack_free (&util_obstack, util_firstobj);
return result;