NULL dereference when memory is tight

From: Brian Sutherland <brian(at)vanguardistas(dot)net>
To: Psycopg List <psycopg(at)postgresql(dot)org>
Subject: NULL dereference when memory is tight
Date: 2011-02-20 16:47:00
Message-ID: 20110220164700.GC20732@Boo.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

Hi,

I recently found a few places in the latest beta release where a NULL
dereference could occur when insufficient memory is available.

For example in connection_type.c:

830 self->dsn = strdup(dsn);
...
855 pos = strstr(self->dsn, "password");

strdup could return a NULL.

Admittedly this is probably a minor bug, but would it interest anyone if
I report these somewhere?

--
Brian Sutherland

Responses

Browse psycopg by date

  From Date Subject
Next Message Daniele Varrazzo 2011-02-20 18:06:30 Re: NULL dereference when memory is tight
Previous Message Daniele Varrazzo 2011-02-20 11:32:28 Re: Conversion of empty arrays