Error in chkpass.c (contrib area) with suggestion

From: Sedlak Anton <ased(at)cce(dot)cz>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Error in chkpass.c (contrib area) with suggestion
Date: 2002-10-22 11:00:00
Message-ID: 3DB52FB0.3060506@cce.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message pgsql-bugs 2002-10-22 12:29:20 Bug #802: Can't short hungarian database with PostgreSQL on Debian/Woody
Previous Message Tom Lane 2002-10-22 04:31:15 Re: Odd random drop sequence failure