Skip site navigation (1) Skip section navigation (2)

Re: fix for palloc() of user-supplied length

From: Serguei Mokhov <mokhov(at)cs(dot)concordia(dot)ca>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>,PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: fix for palloc() of user-supplied length
Date: 2002-08-28 04:12:26
Message-ID: 1030507946.3d6c4daa4fc22@mailhost.cs.concordia.ca (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
I wrote:

> > I've attached a revised patch that includes the additional check Tom
> > suggested (len < 1). Unless anyone else steps forward, I'm inclined to
> 
> +         if (len < 1 || len > 8192)
> +         {
> +                 elog(LOG, "Password packet length too long: %d", len);
>                                                     ^^^^^^^^
> Shouldn't it be changed to 'too long || too long' then? ;)

A typo: [too short or too short] :)

-- 
Serguei A. Mokhov, <mailto: mokhov @ cs.concordia.ca>
Computer Science, Concordia University

-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2002-08-28 04:29:16
Subject: Re: [SQL] LIMIT 1 FOR UPDATE or FOR UPDATE LIMIT 1?
Previous:From: Serguei MokhovDate: 2002-08-28 04:07:22
Subject: Re: fix for palloc() of user-supplied length

pgsql-patches by date

Next:From: Neil ConwayDate: 2002-08-28 04:33:26
Subject: Re: fix for palloc() of user-supplied length
Previous:From: Serguei MokhovDate: 2002-08-28 04:07:22
Subject: Re: fix for palloc() of user-supplied length

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group