libpurple/proxy.c

branch
release-2.x.y
changeset 36044
b621a018a338
parent 36037
e2ef692ff10a
child 36045
f986ac8e9e0c
child 36256
a437550a9308
--- a/libpurple/proxy.c	Thu May 15 17:30:07 2014 +0200
+++ b/libpurple/proxy.c	Thu May 15 21:08:10 2014 +0200
@@ -1720,7 +1720,7 @@
 	navas = *cmdbuf;
 
 	purple_debug_misc("socks5 proxy", "Expecting %d attribute(s).\n", navas);
-	if (G_UNLIKELY(navas > 10000)) { /* XXX: what's the threshold? */
+	if (G_UNLIKELY(navas < 0 || navas > 10000)) { /* XXX: what's the threshold? */
 		purple_proxy_connect_data_disconnect(connect_data,
 			_("Received invalid data on connection with server"));
 		return -1;

mercurial