Re: Small fix: avoid passing null pointers to memcpy()

From: Piotr Stefaniak <postgres(at)piotr-stefaniak(dot)me>
To: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Small fix: avoid passing null pointers to memcpy()
Date: 2016-04-16 12:48:00
Message-ID: BLU436-SMTP121BA7AAE8B0B6AA7D3E556F2690@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2016-04-03 09:24, Piotr Stefaniak wrote:
> from running the regression test suite (including TAP tests) and also
> sqlsmith, I've got a couple of places where UBSan reported calls to
> memcpy() with null pointer passed as either source or destination.
>
> Patch attached.

Patch updated.

Since this time the patch includes fixes for other standard library
function calls (memset and bsearch), I'm renaming the patch file to be
more generic.

Attachment Content-Type Size
dont-pass-null-pointers-ub.patch text/x-patch 6.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andreas Karlsson 2016-04-16 13:00:08 Re: Refactor pg_dump as a library?
Previous Message Amit Kapila 2016-04-16 12:31:58 Re: Detrimental performance impact of ringbuffers on performance