apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: apr/include apr_lib.h
Date Sun, 11 Feb 2001 23:31:04 GMT
wrowe       01/02/11 15:31:04

  Modified:    .        CHANGES
               passwd   apr_getpass.c
               include  apr_lib.h
  Log:
    result(?)  What result?  Stop mauling the size_t arg and overwrite the
    system buffer before returning from apr_password_get, and clean up doc.
  
  Revision  Changes    Path
  1.59      +3 -0      apr/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr/CHANGES,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- CHANGES	2001/02/11 00:12:10	1.58
  +++ CHANGES	2001/02/11 23:31:04	1.59
  @@ -1,5 +1,8 @@
   Changes with APR b1  
   
  +  *) Purge system password buffer before returning from apr_password_get.
  +     No longer abuses bufsize argument on return.  [William Rowe]
  +
     *) Moved the prototypes for apr_snprintf and apr_vsnprintf to the
        apr_strings.h header, from apr_lib.h.  This location makes more
        sense.  [Ryan Bloom]
  
  
  
  1.11      +2 -1      apr/passwd/apr_getpass.c
  
  Index: apr_getpass.c
  ===================================================================
  RCS file: /home/cvs/apr/passwd/apr_getpass.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- apr_getpass.c	2001/02/08 07:44:59	1.10
  +++ apr_getpass.c	2001/02/11 23:31:04	1.11
  @@ -220,9 +220,10 @@
       pw_got = getpass(prompt);
       if (strlen(pw_got) > (*bufsiz - 1)) {
   	*bufsiz = ERR_OVERFLOW;
  +        memset(pw_got, 0, strlen(pw_got));
           return APR_ENAMETOOLONG;
       }
       apr_cpystrn(pwbuf, pw_got, *bufsiz);
  -    *bufsiz = result;
  +    memset(pw_got, 0, strlen(pw_got));
       return APR_SUCCESS; 
   }
  
  
  
  1.52      +3 -3      apr/include/apr_lib.h
  
  Index: apr_lib.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_lib.h,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- apr_lib.h	2001/02/11 00:12:11	1.51
  +++ apr_lib.h	2001/02/11 23:31:04	1.52
  @@ -220,12 +220,12 @@
   /**
    * Display a prompt and read in the password from stdin.
    * @param prompt The prompt to display
  - * @param pwbuf Where to store the password
  - * @param bufsize The length of the password string.
  + * @param pwbuf Buffer to store the password
  + * @param bufsize The length of the password buffer.
    * @deffunc apr_status_t apr_password_get(const char *prompt, char *pwbuf, size_t *bufsize)
    */
   APR_DECLARE(apr_status_t) apr_password_get(const char *prompt, char *pwbuf, 
  -                                      size_t *bufsize);
  +                                           size_t *bufsize);
   
   #ifdef __cplusplus
   }
  
  
  

Mime
View raw message