pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: pg_standby: Avoid writing one byte beyond the end of the buffer.
Date: Thu, 15 Jan 2015 14:46:57 +0000
Message-ID: <E1YBlhJ-0005BV-D9@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

pg_standby: Avoid writing one byte beyond the end of the buffer.

Previously, read() might have returned a length equal to the buffer
length, and then the subsequent store to buf[len] would write a
zero-byte one byte past the end.  This doesn't seem likely to be
a security issue, but there's some chance it could result in
pg_standby misbehaving.

Spotted by Coverity; patch by Michael Paquier, reviewed by me.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/0b49642b99ca2818bb8bfcaddf522b2e36a5b350

Modified Files
--------------
contrib/pg_standby/pg_standby.c |    2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


view thread (6+ messages)

Message-ID: <E1YBlhJ-0005BV-D9@gemulon.postgresql.org>
Permalink:  ../E1YBlhJ-0005BV-D9@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1YBlhJ-0005BV-D9@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: rhaas@postgresql.org
  Subject: Re: pgsql: pg_standby: Avoid writing one byte beyond the end of the buffer.
  In-Reply-To: <E1YBlhJ-0005BV-D9@gemulon.postgresql.org>
  References: <E1YBlhJ-0005BV-D9@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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