[PATCH] readlink missing nul-termination in pg_rewind

From: Abhijit Menon-Sen <ams(at)2ndQuadrant(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Subject: [PATCH] readlink missing nul-termination in pg_rewind
Date: 2015-05-28 15:43:48
Message-ID: 20150528154348.GA22156@toroid.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

This is just something I noticed in passing. (I did a quick check of all
the other uses of readlink in the source, and they do get this right.)

-- Abhijit

P.S. Also in passing, I note that pg_rewind will follow links under any
directory anywhere named pg_tblspc (which probably doesn't matter), and
does not follow pg_xlog if it's a symlink (which probably does). If you
want, I can submit a trivial patch for the latter.

Attachment Content-Type Size
0001-readlink-doesn-t-nul-terminate-the-buffer-so-we-have.patch text/x-diff 688 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2015-05-28 15:43:52 Re: WIP: Enhanced ALTER OPERATOR
Previous Message Christoph Berg 2015-05-28 15:26:56 Re: pg_upgrade resets timeline to 1