biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / applications / version-management / cvs / CVE-2012-0804.patch
blobcd2b324729fbc923711af7b6a1e982df52ad1b0e
1 diff --git a/src/client.c b/src/client.c
2 index 751406b..b45d89c 100644
3 --- a/src/client.c
4 +++ b/src/client.c
5 @@ -3558,9 +3558,9 @@ connect_to_pserver (cvsroot_t *root, struct buffer **to_server_p,
6 * code.
7 */
8 read_line_via (from_server, to_server, &read_buf);
9 - sscanf (read_buf, "%s %d", write_buf, &codenum);
10 + count = sscanf (read_buf, "%*s %d", &codenum);
12 - if ((codenum / 100) != 2)
13 + if (count != 1 || (codenum / 100) != 2)
14 error (1, 0, "proxy server %s:%d does not support http tunnelling",
15 root->proxy_hostname, proxy_port_number);
16 free (read_buf);