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
9ffe483f
Commit
9ffe483f
authored
Oct 26, 1994
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(expand_lib, main): Fix off-by-one bugs in several calls to malloc.
From-SVN: r8344
parent
684e4e06
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
gcc/config/winnt/ld.c
+3
-3
No files found.
gcc/config/winnt/ld.c
View file @
9ffe483f
...
...
@@ -116,7 +116,7 @@ expand_lib (name)
{
char
*
lib
,
*
lib_path
;
lib
=
malloc
(
strlen
(
name
)
+
5
);
lib
=
malloc
(
strlen
(
name
)
+
6
);
strcpy
(
lib
,
"lib"
);
strcat
(
lib
,
name
);
strcat
(
lib
,
".a"
);
...
...
@@ -195,7 +195,7 @@ main (argc, argv)
int
out_len
;
i
++
;
out_len
=
strlen
(
argv
[
i
])
+
9
;
out_len
=
strlen
(
argv
[
i
])
+
10
;
buff
=
malloc
(
out_len
);
strcpy
(
buff
,
"-out:"
);
strcat
(
buff
,
argv
[
i
]);
...
...
@@ -213,7 +213,7 @@ main (argc, argv)
new_len
=
strlen
(
&
argv
[
i
][
2
]);
search_dirs_len
=
strlen
(
search_dirs
);
nbuff
=
malloc
(
new_len
);
nbuff
=
malloc
(
new_len
+
1
);
strcpy
(
nbuff
,
&
argv
[
i
][
2
]);
for
(
j
=
0
;
j
<
new_len
;
j
++
)
...
...
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