| From: | Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com> |
|---|---|
| To: | Brian Sutherland <brian(at)vanguardistas(dot)net> |
| Cc: | Psycopg List <psycopg(at)postgresql(dot)org> |
| Subject: | Re: NULL dereference when memory is tight |
| Date: | 2011-02-20 18:06:30 |
| Message-ID: | AANLkTinMQwZDCpGCZcbHE7exyNsp18UQ9SLDq0K8Jwq2@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | psycopg |
On Sun, Feb 20, 2011 at 4:47 PM, Brian Sutherland
<brian(at)vanguardistas(dot)net> wrote:
> 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?
Thank you for the review. Having patches would be even better, but I
will take care of this one.
Cheers
-- Daniele
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jan Urbański | 2011-02-20 22:08:44 | register_hstore does DB queries, does not play well with async connections |
| Previous Message | Brian Sutherland | 2011-02-20 16:47:00 | NULL dereference when memory is tight |