You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Antonio Alvarado Hernández <aa...@gmail.com> on 2006/03/27 10:48:32 UTC

[PATCH] apr_gid_get on Win32 access violation

Hello.

Following is a nano patch to avoid "Access violation" on testall.exe
when call "apr_gid_get" with a NULL groupname on Win32, for your
consideration.

Regards,
Antonio

Fwd: [PATCH] apr_gid_get on Win32 access violation

Posted by Antonio Alvarado Hernández <aa...@gmail.com>.
> ---------- Forwarded message ----------
> From: Garrett Rooney <ro...@electricjellyfish.net>
> Date: Mar 27, 2006 9:45 PM
> Subject: Re: [PATCH] apr_gid_get on Win32 access violation
> To: Antonio Alvarado Hernández <aa...@gmail.com>
> Cc: dev@apr.apache.org
>
> On 3/27/06, Antonio Alvarado Hernández <aa...@gmail.com> wrote:
> > Hello.
> >
> > Following is a nano patch to avoid "Access violation" on testall.exe
> > when call "apr_gid_get" with a NULL groupname on Win32, for your
> > consideration.
>
> APR doesn't generally check for NULL input on function arguments, it's
> the responsibility of the caller to not pass invalid arguments.  This
> problem should be fixed at the level of the calling code.

Oops.... Sorry. I just take this stuff from apr_gid_name_get where put:
    ...
    if (!groupid)
        return APR_EINVAL;
    ...

Regards,
Antonio

Re: [PATCH] apr_gid_get on Win32 access violation

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 3/27/06, Antonio Alvarado Hernández <aa...@gmail.com> wrote:
> Hello.
>
> Following is a nano patch to avoid "Access violation" on testall.exe
> when call "apr_gid_get" with a NULL groupname on Win32, for your
> consideration.

APR doesn't generally check for NULL input on function arguments, it's
the responsibility of the caller to not pass invalid arguments.  This
problem should be fixed at the level of the calling code.

-garrett