r2380 - in branches/1.2: . bin/varnishd
des at projects.linpro.no
des at projects.linpro.no
Wed Jan 23 17:24:30 CET 2008
Author: des
Date: 2008-01-23 17:24:30 +0100 (Wed, 23 Jan 2008)
New Revision: 2380
Modified:
branches/1.2/
branches/1.2/bin/varnishd/mgt_vcc.c
Log:
Merged revisions 2379 via svnmerge from
svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache
........
r2379 | des | 2008-01-23 17:23:28 +0100 (Wed, 23 Jan 2008) | 6 lines
It is possible for VSS_parse() to succeed and return a NULL addr but a
non-NULL port (e.g. ":80" which is a valid listening address). In that
case, port should be free()d before returning.
Coverity Scan (CID:15)
........
Property changes on: branches/1.2
___________________________________________________________________
Name: svnmerge-integrated
- /trunk/varnish-cache:1-2101,2104-2107,2115-2120,2122-2130,2133,2151,2153-2154,2157,2161-2162,2166-2168,2173,2175-2176,2180-2184,2186-2193,2206,2208,2210-2215,2220,2222-2232,2243,2246-2255,2375
+ /trunk/varnish-cache:1-2101,2104-2107,2115-2120,2122-2130,2133,2151,2153-2154,2157,2161-2162,2166-2168,2173,2175-2176,2180-2184,2186-2193,2206,2208,2210-2215,2220,2222-2232,2243,2246-2255,2375,2379
Modified: branches/1.2/bin/varnishd/mgt_vcc.c
===================================================================
--- branches/1.2/bin/varnishd/mgt_vcc.c 2008-01-23 16:23:28 UTC (rev 2379)
+++ branches/1.2/bin/varnishd/mgt_vcc.c 2008-01-23 16:24:30 UTC (rev 2380)
@@ -391,6 +391,14 @@
* XXX: again: we should check it here in the "trivial" case.
*/
if (VSS_parse(b_arg, &addr, &port) != 0 || addr == NULL) {
+ /*
+ * (addr == NULL && port != NULL) is possible if
+ * the user incorrectly specified an address such
+ * as ":80", which is a valid listening address.
+ * In the future, we may want to interpret this as
+ * a shortcut for "localhost:80".
+ */
+ free(port);
fprintf(stderr, "invalid backend address\n");
return (1);
}
More information about the varnish-commit
mailing list