Re: (yet) more buffer paranoia

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Neil Conway <neilc(at)samurai(dot)com>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: (yet) more buffer paranoia
Date: 2002-08-24 04:39:26
Message-ID: 200208240439.g7O4dQV25287@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


I guess the question is where there are tons more. If not, I think it
would be wise to just clean it up so any future uses will look out of
place. Can someone check on this?

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

Tom Lane wrote:
> Neil Conway <neilc(at)samurai(dot)com> writes:
> > This patches replaces a few more usages of strcpy() and sprintf() when
> > copying into a fixed-size buffer (in this case, a buffer of
> > NAMEDATALEN bytes). AFAICT nothing to worry about here, but worth
> > fixing anyway...
>
> I'm not that eager to replace every single sprintf with snprintf.
> Most of these are obviously safe and do not need the clutter and
> extra cycles...
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go 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

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2002-08-24 04:52:55 Re: (yet) more buffer paranoia
Previous Message Tom Lane 2002-08-24 04:32:47 Re: (yet) more buffer paranoia