Re: Error in chkpass.c (contrib area) with suggestion

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Sedlak Anton <ased(at)cce(dot)cz>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Error in chkpass.c (contrib area) with suggestion
Date: 2002-11-06 18:01:26
Message-ID: 200211061801.gA6I1Ql11682@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


Looks like 7.3beta has the null checking in the code. Thanks.

---------------------------------------------------------------------------

Sedlak Anton wrote:
> Because author is not responding I'm writing to you.
> In contrib/chkpass.c there is no checking against NULL values on input,
> thus if you call eg. raw(NULL) then postgresql always dies.
> Although storing encrypted password are highly required this behavior
> makes this extension module unusable.
>
> To correct it one must add some checkin before any PG_GETARG_XXX in
> chkpass.c:
> Suggested type of code follows:
> ------------------------------------------------------------------
> if(PG_ARGISNULL(0)) PG_RETURN_NULL();
> ------------------------------------------------------------------
>
> Best regards and let me know if this is acceptable
>
> Sedlak Anton
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Rison, Stuart 2002-11-06 21:30:22 Re: Copying a rowtype variable.
Previous Message Mark Le Huray 2002-11-05 16:38:32 Problem with a sequence being acted on by an on insert rule.