]> git.pld-linux.org Git - packages/apache1.git/blob - apache1-security_htpasswd_user_buffer_overflow.patch
rel 15; builds
[packages/apache1.git] / apache1-security_htpasswd_user_buffer_overflow.patch
1 --- build-tree/apache_1.3.34/src/support/htpasswd.c     2004-11-13 04:52:08.000000000 -0700
2 +++ build-tree/apache_1.3.34/src/support/htpasswd.c     2004-11-13 04:53:44.000000000 -0700
3 @@ -414,11 +414,11 @@
4             return ERR_OVERFLOW;
5         }
6         strcpy(pwfilename, argv[i]);
7 -       if (strlen(argv[i + 1]) > (sizeof(user) - 1)) {
8 -           fprintf(stderr, "%s: username too long (>%lu)\n", argv[0],
9 -                   (unsigned long)(sizeof(user) - 1));
10 -           return ERR_OVERFLOW;
11 -       }
12 +    }
13 +    if (strlen(argv[i + 1]) > (sizeof(user) - 1)) {
14 +       fprintf(stderr, "%s: username too long (>%lu)\n", argv[0],
15 +               (unsigned long)(sizeof(user) - 1));
16 +       return ERR_OVERFLOW;
17      }
18      strcpy(user, argv[i + 1]);
19      if ((arg = strchr(user, ':')) != NULL) {
This page took 0.047439 seconds and 3 git commands to generate.