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: Small fix: avoid passing null pointers to memcpy()
Date: 2016-04-03 07:24:27
Message-ID: BLU436-SMTP8256702947EF27D3AD76E3F29C0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

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.

Attachment Content-Type Size
memcpy-avoid-nullptr.diff text/x-patch 2.6 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2016-04-03 08:48:53 Re: pgbench more operators & functions
Previous Message Alex Shulgin 2016-04-03 06:24:21 Re: More stable query plans via more predictable column statistics