[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] session.c - get_proxy:port_str not initialized

From: Miklós Fazekas <boga_at_mac.com>
Date: 2002-06-14 09:10:04 CEST

In /subversion/libsvn_ra_dav/session.c port_str is not initialized to
NULL and that causes a crash:

The following crashed me because port_str was not NULL, but
uninitialized. (Neither of the above svn_config_get was executed)

   if (port_str)
     *proxy_port = atoi(port_str);
   else
     *proxy_port = -1;

Initializing port_str to NULL solved the problem.

Regards,
Miklos

Index: subversion/libsvn_ra_dav/session.c
===================================================================
--- subversion/libsvn_ra_dav/session.c
+++ subversion/libsvn_ra_dav/session.c Thu Jun 13 18:13:34 2002
@@ -213,6 +213,8 @@
    *proxy_username = NULL;
    *proxy_password = NULL;

+ port_str = NULL;
+
    SVN_ERR( svn_config_read_proxies(&cfg, pool) );

    /* If there are defaults, use them, but only if the requested host

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jun 14 09:10:52 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.