~ubuntu-branches/ubuntu/hoary/cvs/hoary-security

« back to all changes in this revision

Viewing changes to debian/patches/62_cvsrc_whitespace

  • Committer: Bazaar Package Importer
  • Author(s): Steve McIntyre
  • Date: 2004-06-09 20:42:37 UTC
  • Revision ID: james.westby@ubuntu.com-20040609204237-xdqypwnaqxd965tc
Tags: 1:1.12.9-1
* New upstream version.
  + Several security fixes: CAN-2004-0414, CAN-2004-0416,
    CAN-2004-0417 & CAN-2004-0418

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--- cvs-1.12.9/src/cvsrc.c.old  2003-10-12 23:41:25.000000000 +0100
 
2
+++ cvs-1.12.9/src/cvsrc.c      2003-10-12 23:43:58.000000000 +0100
 
3
@@ -41,6 +41,7 @@
 
4
     size_t line_chars_allocated;
 
5
 
 
6
     char *optstart;
 
7
+    int white_len;
 
8
 
 
9
     int command_len;
 
10
     int found = 0;
 
11
@@ -96,9 +97,12 @@
 
12
        if (line[0] == '#')
 
13
            continue;
 
14
 
 
15
+    for (white_len=0; isspace(line[white_len]); white_len++)
 
16
+        ;
 
17
+
 
18
        /* stop if we match the current command */
 
19
-       if (!strncmp (line, cmdname, command_len)
 
20
-           && isspace ((unsigned char) *(line + command_len)))
 
21
+       if (!strncmp (line + white_len, cmdname, command_len)
 
22
+           && isspace ((unsigned char) *(line + white_len + command_len)))
 
23
        {
 
24
            found = 1;
 
25
            break;
 
26
@@ -120,7 +124,7 @@
 
27
     if (found)
 
28
     {
 
29
        /* skip over command in the options line */
 
30
-       for (optstart = strtok (line + command_len, "\t \n");
 
31
+       for (optstart = strtok (line + white_len + command_len, "\t \n");
 
32
             optstart;
 
33
             optstart = strtok (NULL, "\t \n"))
 
34
        {