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

Re: [HACKERS] found another overrun

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: mgittens(at)david(dot)gits(dot)nl (Maurice Gittens)
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] found another overrun
Date: 1998-03-30 17:45:38
Message-ID: 199803301745.MAA15756@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Patch applied.

> 
> Hi,
> This simple patch to catalog/pg_type.c fixes a buffer overrun.
> It was detected by Electric Fence and triggered by statements like:
> 
> 	SELECT * into table t from pg_database;
> 
> The system would crash on a memmove call in DataFile() with arguments like this:
> 
> 	memmove(0x0, 0x0, 0); 
> 
> Here's the patch.
> 
> 320a321
> > 	NameData	 	name;
> 390c391,392
> < 	values[i++] = PointerGetDatum(typeName);	/* 1 */
> ---
> > 	namestrcpy(&name,typeName);
> > 	values[i++] = NameGetDatum(&name);	/* 1 */
> 
> After applying the patch the problem goes away.
> 
> I'll try to make all the buffer overruns detected by Electric Fence
> during the regression test on my Linux system go away -:).
> Debugging is a nice way to learn about a system isn't it?
> 
> With regards from Maurice.
> 
> 
> 


-- 
Bruce Momjian                          |  830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

In response to

pgsql-hackers by date

Next:From: Paul RainesDate: 1998-03-30 17:54:50
Subject: Re: Let's talk up 6.3
Previous:From: Bruce MomjianDate: 1998-03-30 17:35:20
Subject: Re: [HACKERS] Re: [PORTS] Pgaccess doesn't run on -current anymore, Update (fwd)

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