You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by bn...@apache.org on 2002/05/03 00:03:58 UTC

cvs commit: httpd-2.0/modules/aaa mod_auth_digest.c

bnicholes    02/05/02 15:03:58

  Modified:    modules/aaa mod_auth_digest.c
  Log:
  By using _setn instead of _set, this call is setting a pointer to a stack variable
  in the hash entry.  Once initialize_module() returns, the key pointer in the
  hash entry is invalid.  This causes a fault the next time that the hash entry
  key is checked.  Calling the _set() version will store a copy of the key which
  has the same lifetime as the hash table entry.
  
  Revision  Changes    Path
  1.63      +1 -1      httpd-2.0/modules/aaa/mod_auth_digest.c
  
  Index: mod_auth_digest.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/aaa/mod_auth_digest.c,v
  retrieving revision 1.62
  retrieving revision 1.63
  diff -u -r1.62 -r1.63
  --- mod_auth_digest.c	28 Apr 2002 09:02:19 -0000	1.62
  +++ mod_auth_digest.c	2 May 2002 22:03:58 -0000	1.63
  @@ -384,7 +384,7 @@
        * set up our static data on the second call. */
       apr_pool_userdata_get(&data, userdata_key, s->process->pool);
       if (!data) {
  -        apr_pool_userdata_setn((const void *)1, userdata_key,
  +        apr_pool_userdata_set((const void *)1, userdata_key,
                                  apr_pool_cleanup_null, s->process->pool);
           return OK;
       }