r25455 - in /desktop/unstable/vino/debian: changelog patches/11_hurd_maxhostnamelen.patch
joss at users.alioth.debian.org
joss at users.alioth.debian.org
Sat Oct 30 09:12:08 UTC 2010
Author: joss
Date: Sat Oct 30 09:12:02 2010
New Revision: 25455
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=25455
Log:
11_hurd_maxhostnamelen.patch: updated to not just crash dumbly.
Closes: #600704, #570615.
Modified:
desktop/unstable/vino/debian/changelog
desktop/unstable/vino/debian/patches/11_hurd_maxhostnamelen.patch
Modified: desktop/unstable/vino/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/vino/debian/changelog?rev=25455&op=diff
==============================================================================
--- desktop/unstable/vino/debian/changelog [utf-8] (original)
+++ desktop/unstable/vino/debian/changelog [utf-8] Sat Oct 30 09:12:02 2010
@@ -6,6 +6,10 @@
[ Jordi Mallach ]
* Set the GNOME team as primary maintainer.
+
+ [ Josselin Mouette ]
+ * 11_hurd_maxhostnamelen.patch: updated to not just crash dumbly.
+ Closes: #600704, #570615.
-- Jordi Mallach <jordi at debian.org> Sun, 17 Oct 2010 13:43:00 +0200
Modified: desktop/unstable/vino/debian/patches/11_hurd_maxhostnamelen.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/vino/debian/patches/11_hurd_maxhostnamelen.patch?rev=25455&op=diff
==============================================================================
--- desktop/unstable/vino/debian/patches/11_hurd_maxhostnamelen.patch [utf-8] (original)
+++ desktop/unstable/vino/debian/patches/11_hurd_maxhostnamelen.patch [utf-8] Sat Oct 30 09:12:02 2010
@@ -1,6 +1,6 @@
-diff -ruNp vino-2.28.1/server/miniupnp/miniupnpc.c vino-2.28.1.new/server/miniupnp/miniupnpc.c
---- vino-2.28.1/server/miniupnp/miniupnpc.c 2009-04-18 15:22:24.000000000 +0200
-+++ vino-2.28.1.new/server/miniupnp/miniupnpc.c 2009-12-04 01:01:02.000000000 +0100
+diff -pruN --exclude '*~' vino-2.28.2.orig/server/miniupnp/miniupnpc.c vino-2.28.2/server/miniupnp/miniupnpc.c
+--- vino-2.28.2.orig/server/miniupnp/miniupnpc.c 2009-04-18 15:22:24.000000000 +0200
++++ vino-2.28.2/server/miniupnp/miniupnpc.c 2010-10-30 11:02:44.175262881 +0200
@@ -13,7 +13,6 @@
#include <io.h>
#define snprintf _snprintf
@@ -9,7 +9,7 @@
#else
#include <unistd.h>
#include <sys/socket.h>
-@@ -132,7 +131,7 @@ int simpleUPnPcommand(int s, const char
+@@ -132,7 +131,7 @@ int simpleUPnPcommand(int s, const char
char * buffer, int * bufsize)
{
struct sockaddr_in dest;
@@ -18,7 +18,16 @@
unsigned short port = 0;
char * path;
char soapact[128];
-@@ -214,6 +213,7 @@ int simpleUPnPcommand(int s, const char
+@@ -206,7 +205,7 @@ int simpleUPnPcommand(int s, const char
+ strncpy(p, "></" SOAPPREFIX ":Body></" SOAPPREFIX ":Envelope>\r\n",
+ soapbody + sizeof(soapbody) - p);
+ }
+- if(!parseURL(url, hostname, &port, &path)) return -1;
++ if(!parseURL(url, &hostname, &port, &path)) return -1;
+ if(s<0)
+ {
+ s = socket(PF_INET, SOCK_STREAM, 0);
+@@ -214,6 +213,7 @@ int simpleUPnPcommand(int s, const char
{
PRINT_SOCKET_ERROR("socket");
*bufsize = 0;
@@ -26,7 +35,7 @@
return -1;
}
dest.sin_family = AF_INET;
-@@ -224,6 +224,7 @@ int simpleUPnPcommand(int s, const char
+@@ -224,11 +224,13 @@ int simpleUPnPcommand(int s, const char
PRINT_SOCKET_ERROR("connect");
closesocket(s);
*bufsize = 0;
@@ -34,17 +43,15 @@
return -1;
}
}
-@@ -234,6 +235,7 @@ int simpleUPnPcommand(int s, const char
+
+ n = soapPostSubmit(s, path, hostname, port, soapact, soapbody);
++ free (hostname)
+ if(n<=0) {
+ #ifdef DEBUG
printf("Error sending SOAP request\n");
- #endif
- closesocket(s);
-+ free (hostname);
- return -1;
- }
-
-diff -ruNp vino-2.28.1/server/miniupnp/miniwget.c vino-2.28.1.new/server/miniupnp/miniwget.c
---- vino-2.28.1/server/miniupnp/miniwget.c 2009-04-18 15:22:24.000000000 +0200
-+++ vino-2.28.1.new/server/miniupnp/miniwget.c 2009-12-04 01:18:42.000000000 +0100
+diff -pruN --exclude '*~' vino-2.28.2.orig/server/miniupnp/miniwget.c vino-2.28.2/server/miniupnp/miniwget.c
+--- vino-2.28.2.orig/server/miniupnp/miniwget.c 2009-04-18 15:22:24.000000000 +0200
++++ vino-2.28.2/server/miniupnp/miniwget.c 2010-10-30 10:48:03.299261556 +0200
@@ -12,7 +12,6 @@
#ifdef WIN32
#include <winsock2.h>
@@ -53,15 +60,23 @@
#define MIN(x,y) (((x)<(y))?(x):(y))
#define snprintf _snprintf
#define herror
-@@ -148,7 +147,7 @@ miniwget2(const char * url, const char *
+@@ -148,14 +147,14 @@ miniwget2(const char * url, const char *
/* parseURL()
* arguments :
* url : source string not modified
- * hostname : hostname destination string (size of MAXHOSTNAMELEN+1)
-+ * hostname : hostname destination string (must be freed by the caller if there was no error)
++ * hostname : hostname destination string (must be freed by the caller if there was no error)
* port : port (destination)
* path : pointer to the path part of the URL
*
+ * Return values :
+ * 0 - Failure
+ * 1 - Success */
+-int parseURL(const char * url, char * hostname, unsigned short * port, char * * path)
++int parseURL(const char * url, char ** hostname, unsigned short * port, char * * path)
+ {
+ char * p1, *p2, *p3;
+ p1 = strstr(url, "://");
@@ -169,15 +168,18 @@ int parseURL(const char * url, char * ho
p3 = strchr(p1, '/');
if(!p3)
@@ -70,21 +85,21 @@
if(!p2 || (p2>p3))
{
- strncpy(hostname, p1, MIN(MAXHOSTNAMELEN, (int)(p3-p1)));
-+ hostname = malloc ((int)(p3-p1) + 1);
++ *hostname = malloc ((int)(p3-p1) + 1);
+ strncpy(hostname, p1, (int)(p3-p1));
-+ hostname[(int)(p3-p1)] = '\0';
++ (*hostname)[(int)(p3-p1)] = '\0';
*port = 80;
}
else
{
- strncpy(hostname, p1, MIN(MAXHOSTNAMELEN, (int)(p2-p1)));
-+ hostname = malloc ((int)(p2-p1) + 1);
++ *hostname = malloc ((int)(p2-p1) + 1);
+ strncpy(hostname, p1, (int)(p2-p1));
-+ hostname[(int)(p2-p1)] = '\0';
++ (*hostname)[(int)(p2-p1)] = '\0';
*port = 0;
p2++;
while( (*p2 >= '0') && (*p2 <= '9'))
-@@ -196,11 +198,14 @@ void * miniwget(const char * url, int *
+@@ -196,11 +198,14 @@ void * miniwget(const char * url, int *
unsigned short port;
char * path;
/* protocol://host:port/chemin */
@@ -92,7 +107,8 @@
+ char *hostname;
+ void *ret;
*size = 0;
- if(!parseURL(url, hostname, &port, &path))
+- if(!parseURL(url, hostname, &port, &path))
++ if(!parseURL(url, &hostname, &port, &path))
return NULL;
- return miniwget2(url, hostname, port, path, size, 0, 0);
+ ret = miniwget2(url, hostname, port, path, size, 0, 0);
@@ -111,7 +127,8 @@
*size = 0;
if(addr)
addr[0] = '\0';
- if(!parseURL(url, hostname, &port, &path))
+- if(!parseURL(url, hostname, &port, &path))
++ if(!parseURL(url, &hostname, &port, &path))
return NULL;
- return miniwget2(url, hostname, port, path, size, addr, addrlen);
+ ret = miniwget2(url, hostname, port, path, size, addr, addrlen);
More information about the pkg-gnome-commits
mailing list