]> git.pld-linux.org Git - packages/apache-mod_auth_pgsql.git/blob - apache-mod_auth_pgsql.patch
- up to 2.0.3, fixes CVE-2005-3656
[packages/apache-mod_auth_pgsql.git] / apache-mod_auth_pgsql.patch
1 diff -uNdr mod_auth_pgsql-2.0.2b1.old/mod_auth_pgsql.c mod_auth_pgsql-2.0.2b1/mod_auth_pgsql.c
2 --- mod_auth_pgsql-2.0.2b1.old/mod_auth_pgsql.c 2003-10-06 10:45:59.000000000 +0200
3 +++ mod_auth_pgsql-2.0.2b1/mod_auth_pgsql.c     2004-10-30 21:22:24.000000000 +0200
4 @@ -88,7 +88,6 @@
5  
6  #include "apr_hooks.h"
7  #include "apr.h"
8 -#include "apr_compat.h"
9  #include "apr_lib.h"
10  #include "apr_strings.h"
11  #include "apr_buckets.h"
12 @@ -449,16 +448,16 @@
13  char *auth_pg_md5(char *pw)
14  {
15         apr_md5_ctx_t ctx;
16 -       unsigned char digest[MD5_DIGESTSIZE];
17 -       static unsigned char md5hash[MD5_DIGESTSIZE * 2 + 1];
18 +       unsigned char digest[APR_MD5_DIGESTSIZE];
19 +       static unsigned char md5hash[APR_MD5_DIGESTSIZE * 2 + 1];
20         int i;
21  
22         apr_md5(digest, (const unsigned char *) pw, strlen(pw));
23  
24 -       for (i = 0; i < MD5_DIGESTSIZE; i++)
25 +       for (i = 0; i < APR_MD5_DIGESTSIZE; i++)
26                 apr_snprintf((char *) &md5hash[i + i], 3, "%02x", digest[i]);
27  
28 -       md5hash[MD5_DIGESTSIZE * 2] = '\0';
29 +       md5hash[APR_MD5_DIGESTSIZE * 2] = '\0';
30         return (char *) md5hash;
31  }
32  
33 @@ -631,7 +630,7 @@
34                         return NULL;
35                 }
36  
37 -               if (!(result = (char *) ap_palloc(r->pool, strlen(val) + 1))) {
38 +               if (!(result = (char *) apr_palloc(r->pool, strlen(val) + 1))) {
39                         apr_snprintf(pg_errstr, MAX_STRING_LEN,
40                                                  "Could not get memory for Postgres query.");
41                         PQclear(pg_result);
This page took 0.044062 seconds and 3 git commands to generate.