Attention is currently required from: cron2, plaisthos.
Hello cron2, plaisthos,
I'd like you to reexamine a change. Please visit
http://gerrit.openvpn.net/c/openvpn/+/490?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Code-Review-1 by cron2
Change subject: phase2_tcp_server: fix Coverity issue "Dereference after null
check"
......................................................................
phase2_tcp_server: fix Coverity issue "Dereference after null check"
As Coverity says:
Either the check against null is unnecessary, or there may be a null
pointer dereference.
In phase2_tcp_server: Pointer is checked against null but then
dereferenced anyway
There is only one caller (link_socket_init_phase2) and it already has
an ASSERT(sig_info). So use that here was well.
v2:
- fix cleanly by actually asserting that sig_info is defined
Change-Id: I8ef199463d46303129a3f563fd9eace780a58b8a
Signed-off-by: Frank Lichtenheld <[email protected]>
---
M src/openvpn/socket.c
1 file changed, 3 insertions(+), 2 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/90/490/2
diff --git a/src/openvpn/socket.c b/src/openvpn/socket.c
index 480f4e5..387cb40 100644
--- a/src/openvpn/socket.c
+++ b/src/openvpn/socket.c
@@ -2005,7 +2005,8 @@
phase2_tcp_server(struct link_socket *sock, const char *remote_dynamic,
struct signal_info *sig_info)
{
- volatile int *signal_received = sig_info ? &sig_info->signal_received :
NULL;
+ ASSERT(sig_info);
+ volatile int *signal_received = &sig_info->signal_received;
switch (sock->mode)
{
case LS_MODE_DEFAULT:
@@ -2031,7 +2032,7 @@
false);
if (!socket_defined(sock->sd))
{
- register_signal(sig_info, SIGTERM, "socket-undefiled");
+ register_signal(sig_info, SIGTERM, "socket-undefined");
return;
}
tcp_connection_established(&sock->info.lsa->actual);
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/490?usp=email
To unsubscribe, or for help writing mail filters, visit
http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I8ef199463d46303129a3f563fd9eace780a58b8a
Gerrit-Change-Number: 490
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]>
Gerrit-Reviewer: cron2 <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]>
Gerrit-Attention: cron2 <[email protected]>
Gerrit-MessageType: newpatchset
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel