[ bringing back to list; OtherBill apparently misfired the reply ] On Sun, Feb 11, 2001 at 09:37:31PM -0600, William A. Rowe, Jr. wrote: > From: "Greg Stein" <[EMAIL PROTECTED]> > Sent: Sunday, February 11, 2001 8:05 PM > > > > > 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. > > > > APR_DECLARE(apr_status_t) apr_password_get(const char *prompt, char > > > *pwbuf, > > > - size_t *bufsize); > > > + size_t *bufsize); > > > Um... couldn't that bufsize just be an apr_size_t rather than "size_t *" ?? > > If you aren't going to return a value, then drop the indirection, right? > > Absolutely apr_size_t. And that is a question, do we want to return the > actual > size needed/used? I personally don't care, but wasn't going to make that call > when I was fixing the fn (returned 0 before, rather useless.) So I'd agree in > part, either apr_size_t bufsize, or apr_size_t *bufsize returning the size > used > or needed (len as returned by getpass).
I don't think we need to return the size. The caller can always use strlen() if that is needed. Cheers, -g -- Greg Stein, http://www.lyra.org/
