projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5b1eb3
)
(objc_read_string): Allocate string properly.
author
Richard Stallman
<rms@gnu.org>
Fri, 5 Nov 1993 20:31:48 +0000
(20:31 +0000)
committer
Richard Stallman
<rms@gnu.org>
Fri, 5 Nov 1993 20:31:48 +0000
(20:31 +0000)
From-SVN: r6013
gcc/objc/archive.c
patch
|
blob
|
history
diff --git
a/gcc/objc/archive.c
b/gcc/objc/archive.c
index 87bd5855fa3ab2c398735b75bd8dba8c19fd6c05..1e776c71598d5d6a81c43b7e3a02852e6cee1552 100644
(file)
--- a/
gcc/objc/archive.c
+++ b/
gcc/objc/archive.c
@@
-617,8
+617,11
@@
objc_read_string (struct objc_typed_stream* stream,
case _B_UCOMM:
{
- len = __objc_read_nbyte_uint(stream, (buf[0] & _B_VALUE), &key);
- (*string) = hash_value_for_key (stream->stream_table, (void*)key);
+ char *tmp;
+ len = __objc_read_nbyte_uint (stream, (buf[0] & _B_VALUE), &key);
+ tmp = hash_value_for_key (stream->stream_table, (void*)key);
+ *string = __objc_xmalloc (strlen (tmp) + 1);
+ strcpy (*string, tmp);
}
break;