Re: [PATCH] Fix bug when calling strncmp in check_authmethod_valid

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: Jingxian Li <aqktjcm(at)qq(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Fix bug when calling strncmp in check_authmethod_valid
Date: 2024-04-30 04:16:23
Message-ID: CAMbWs4-EyvHYyL1xa+pxUDVEu+835gZ0y=vs7NdqGxbGMwRqTA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 30, 2024 at 10:41 AM Jingxian Li <aqktjcm(at)qq(dot)com> wrote:

> Attached is a patch that fixes bug when calling strncmp function, in
> which case the third argument (authmethod - strchr(authmethod, ' '))
> may be negative, which is not as expected..

Nice catch. I think you're right from a quick glance.

Thanks
Richard

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2024-04-30 04:40:48 Re: DROP OWNED BY fails to clean out pg_init_privs grants
Previous Message Tom Lane 2024-04-30 04:10:02 Re: DROP OWNED BY fails to clean out pg_init_privs grants