Re: Interesting message about printf()'s in PostgreSQL

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Justin Clift" <justin(at)postgresql(dot)org>, "PostgreSQL Hackers Mailing List" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Interesting message about printf()'s in PostgreSQL
Date: 2002-08-12 06:31:34
Message-ID: GNELIHDDFBOCMGBFGEFOKEKFCDAA.chriskl@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> I've just finished a quick grep through the backend sources for
> "sprintf", and identified the following files as containing possible
> problems:
> src/backend/port/dynloader/freebsd.c

This one is perhaps dodgy. You ahve this:

static char error_message[BUFSIZ];

Then you have this:

sprintf(error_message, "dlopen (%s) not supported", file);

Where file isn't restricted in length I think...

So does that mean if you go:

CREATE FUNCTION blah AS '/home/chriskl/[90000 characters here].so' LANGUAGE
'C';

Sort of thing you could crash it?

Chris

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-08-12 06:35:17 Re: Interesting message about printf()'s in PostgreSQL
Previous Message Don Baccus 2002-08-12 06:30:20 Re: OOP real life example (was Re: Why is MySQL more chosen