pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Avoid calling memcpy() with a NULL source pointer and count == 0 2+ messages / 1 participants [nested] [flat]
* pgsql: Avoid calling memcpy() with a NULL source pointer and count == 0 @ 2015-08-02 19:48 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2015-08-02 19:48 UTC (permalink / raw) To: pgsql-committers Avoid calling memcpy() with a NULL source pointer and count == 0. As in commit 0a52d378b03b7d5a, avoid doing something that has undefined results according to the C standard, even though in practice there does not seem to be any problem with it. This fixes two places in numeric.c that demonstrably could call memcpy() with such arguments. I looked through that file and didn't see any other places with similar hazards; this is not to claim that there are not such places in other files. Per report from Piotr Stefaniak. Back-patch to 9.5 which is where the previous commit was added. We're more or less setting a precedent that we will not worry about this type of issue in pre-9.5 branches unless someone demonstrates a problem in the field. Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/13bba02271dce865cd20b6f49224889c73fed4e7 Modified Files -------------- src/backend/utils/adt/numeric.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Avoid calling memcpy() with a NULL source pointer and count == 0 @ 2015-08-02 19:48 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2015-08-02 19:48 UTC (permalink / raw) To: pgsql-committers Avoid calling memcpy() with a NULL source pointer and count == 0. As in commit 0a52d378b03b7d5a, avoid doing something that has undefined results according to the C standard, even though in practice there does not seem to be any problem with it. This fixes two places in numeric.c that demonstrably could call memcpy() with such arguments. I looked through that file and didn't see any other places with similar hazards; this is not to claim that there are not such places in other files. Per report from Piotr Stefaniak. Back-patch to 9.5 which is where the previous commit was added. We're more or less setting a precedent that we will not worry about this type of issue in pre-9.5 branches unless someone demonstrates a problem in the field. Branch ------ REL9_5_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/c75b1f75b3d159c0e71c1ec7f42c922bce448d89 Modified Files -------------- src/backend/utils/adt/numeric.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2015-08-02 19:48 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2015-08-02 19:48 pgsql: Avoid calling memcpy() with a NULL source pointer and count == 0 Tom Lane <tgl@sss.pgh.pa.us> 2015-08-02 19:48 pgsql: Avoid calling memcpy() with a NULL source pointer and count == 0 Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox