Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
David Goulet
Tor
Commits
e59f0d4c
Commit
e59f0d4c
authored
Oct 10, 2016
by
George Kadianakis
Browse files
Fix non-triggerable heap corruption at do_getpass().
parent
68450051
Changes
2
Hide whitespace changes
Inline
Side-by-side
changes/bug19223
0 → 100644
View file @
e59f0d4c
o Minor bugfixes (getpass):
- Defensively fix a non-triggerable heap corruption at do_getpass() tow
protect ourselves from mistakes in the future. Fixes bug #19223; bugfix
on 0.2.7.3-rc. Bug found by Guido Vranken, patch by nherring.
\ No newline at end of file
src/or/routerkeys.c
View file @
e59f0d4c
...
...
@@ -48,8 +48,8 @@ do_getpass(const char *prompt, char *buf, size_t buflen,
size_t
p2len
=
strlen
(
prompt
)
+
1
;
if
(
p2len
<
sizeof
(
msg
))
p2len
=
sizeof
(
msg
);
prompt2
=
tor_malloc
(
strlen
(
prompt
)
+
1
);
memset
(
prompt2
,
' '
,
p2len
);
prompt2
=
tor_malloc
(
p2len
);
memset
(
prompt2
,
' '
,
p2len
-
sizeof
(
msg
)
);
memcpy
(
prompt2
+
p2len
-
sizeof
(
msg
),
msg
,
sizeof
(
msg
));
buf2
=
tor_malloc_zero
(
buflen
);
...
...
Write
Preview
Supports
Markdown
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