Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
ae502c4e
Commit
ae502c4e
authored
Sep 01, 2011
by
Dave Cheney
Committed by
Russ Cox
Sep 01, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libmach: fix incorrect use of memset
Fixes #2213. R=rsc CC=golang-dev
https://golang.org/cl/4975047
parent
b0bd77f8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/libmach/executable.c
src/libmach/executable.c
+2
-2
No files found.
src/libmach/executable.c
View file @
ae502c4e
...
...
@@ -811,7 +811,7 @@ elf64dotout(int fd, Fhdr *fp, ExecHdr *hp)
buf
=
malloc
(
sh
[
ep
->
shstrndx
].
size
);
if
(
buf
==
0
)
goto
done
;
memset
(
buf
,
0
,
s
izeof
buf
);
memset
(
buf
,
0
,
s
h
[
ep
->
shstrndx
].
size
);
seek
(
fd
,
sh
[
ep
->
shstrndx
].
offset
,
0
);
i
=
read
(
fd
,
buf
,
sh
[
ep
->
shstrndx
].
size
);
USED
(
i
);
// shut up ubuntu gcc
...
...
@@ -989,7 +989,7 @@ elfdotout(int fd, Fhdr *fp, ExecHdr *hp)
buf
=
malloc
(
sh
[
ep
->
shstrndx
].
size
);
if
(
buf
==
0
)
goto
done
;
memset
(
buf
,
0
,
s
izeof
buf
);
memset
(
buf
,
0
,
s
h
[
ep
->
shstrndx
].
size
);
seek
(
fd
,
sh
[
ep
->
shstrndx
].
offset
,
0
);
i
=
read
(
fd
,
buf
,
sh
[
ep
->
shstrndx
].
size
);
USED
(
i
);
// shut up ubuntu gcc
...
...
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