Skip to contentSkip to conversation

Removed no longer needed delete_file() call

PATCH In review David Sommerseth 2 participants 3 messages Apr 17, 2010 – Apr 18, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Removed no longer needed delete_file() call

From: David Sommerseth <[email protected]...>

Fabian Knittel noticed that this delete_file() calls should have been removed in commit b963a17efc10512db442443234731a70b1f56f84

---
 multi.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
multi.c +0 -1
index 826a113..c4276f5 100644
@@ -1538,7 +1538,6 @@ multi_connection_established (struct multi_context *m, struct multi_instance *mi
           }
 
 	  argv_printf (&argv, "%s", dc_file);
-	  delete_file (dc_file);
 	  if (plugin_call (mi->context.plugins, OPENVPN_PLUGIN_CLIENT_CONNECT, &argv, NULL, mi->context.c2.es) != OPENVPN_PLUGIN_FUNC_SUCCESS)
 	    {
 	      msg (M_WARN, "WARNING: client-connect plugin call failed");
Signature · 1 line
1.6.6.1
#1 lore raw

PATCH 2/2 Fixed potential NULL pointer issue

From: David Sommerseth <[email protected]...>

If create_temp_file() returns NULL, this strlen() check would cause a SEGV.

---
 ssl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
ssl.c +1 -1
index 552bcbe..171a1d7 100644
@@ -3194,7 +3194,7 @@ verify_user_pass_script (struct tls_session *session, const struct user_pass *up
     }
 
  done:
-  if (strlen (tmp_file) > 0)
+  if (tmp_file && strlen (tmp_file) > 0)
     delete_file (tmp_file);
 
   argv_reset (&argv);
Signature · 1 line
1.6.6.1
#2 lore raw

Re: [Openvpn-devel] [PATCH 2/2] Fixed potential NULL pointer issue

Hi,

Quoted 2 lines · David Sommerseth

If create_temp_file() returns NULL, this strlen() check would cause a SEGV.

Looks "obviously correct". ACK.

gert

Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...