Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
9cf8d548
Commit
9cf8d548
authored
Sep 20, 1993
by
Kresten Krab Thorup
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(objc_read_string): Allocate n+1 chars instead of just n.
From-SVN: r5371
parent
5738a80a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
gcc/objc/archive.c
+2
-2
No files found.
gcc/objc/archive.c
View file @
9cf8d548
...
@@ -627,10 +627,10 @@ objc_read_string (struct objc_typed_stream* stream,
...
@@ -627,10 +627,10 @@ objc_read_string (struct objc_typed_stream* stream,
unsigned
int
nbytes
=
buf
[
0
]
&
_B_VALUE
;
unsigned
int
nbytes
=
buf
[
0
]
&
_B_VALUE
;
len
=
__objc_read_nbyte_uint
(
stream
,
nbytes
,
&
nbytes
);
len
=
__objc_read_nbyte_uint
(
stream
,
nbytes
,
&
nbytes
);
if
(
len
)
{
if
(
len
)
{
(
*
string
)
=
(
char
*
)
__objc_xmalloc
(
nbytes
);
(
*
string
)
=
(
char
*
)
__objc_xmalloc
(
nbytes
+
1
);
if
(
key
)
if
(
key
)
hash_add
(
&
stream
->
stream_table
,
(
void
*
)
key
,
*
string
);
hash_add
(
&
stream
->
stream_table
,
(
void
*
)
key
,
*
string
);
len
=
(
*
stream
->
read
)(
stream
->
physical
,
*
string
,
buf
[
0
]
&
_B_VALUE
);
len
=
(
*
stream
->
read
)(
stream
->
physical
,
*
string
,
nbytes
);
(
*
string
)[
nbytes
]
=
'\0'
;
(
*
string
)[
nbytes
]
=
'\0'
;
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment