File cvs-CVE-2012-0804.patch of Package cvs

Index: src/client.c
===================================================================
--- src/client.c.orig	2012-01-30 14:32:50.000000000 +0100
+++ src/client.c	2012-01-30 14:34:59.644866100 +0100
@@ -3491,9 +3491,9 @@ connect_to_pserver (cvsroot_t *root, str
          * code.
          */
 	read_line_via (from_server, to_server, &read_buf);
-	sscanf (read_buf, "%s %d", write_buf, &codenum);
+	count = sscanf (read_buf, "%*s %d", &codenum);
 
-	if ((codenum / 100) != 2)
+	if (count != 1 || (codenum / 100) != 2)
 	    error (1, 0, "proxy server %s:%d does not support http tunnelling",
 		   root->proxy_hostname, proxy_port_number);
 	free (read_buf);