Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Matt Johnston
dropbear
Commits
0d9c3fe7
Commit
0d9c3fe7
authored
Nov 15, 2016
by
Francois Perrad
Browse files
initialize variable and protect against NULL dereferencement
parent
2e38ac75
Changes
1
Show whitespace changes
Inline
Side-by-side
cli-tcpfwd.c
View file @
0d9c3fe7
...
...
@@ -234,7 +234,7 @@ static int newtcpforwarded(struct Channel * channel) {
char
*
origaddr
=
NULL
;
unsigned
int
origport
;
m_list_elem
*
iter
=
NULL
;
struct
TCPFwdEntry
*
fwd
;
struct
TCPFwdEntry
*
fwd
=
NULL
;
char
portstring
[
NI_MAXSERV
];
int
err
=
SSH_OPEN_ADMINISTRATIVELY_PROHIBITED
;
...
...
@@ -265,7 +265,7 @@ static int newtcpforwarded(struct Channel * channel) {
}
if
(
iter
==
NULL
)
{
if
(
iter
==
NULL
||
fwd
==
NULL
)
{
/* We didn't request forwarding on that port */
cleantext
(
origaddr
);
dropbear_log
(
LOG_INFO
,
"Server sent unrequested forward from
\"
%s:%d
\"
"
,
...
...
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