Re: 【ECPG】strncpy function does not set the end character '\0'

From: Michael Meskes <meskes(at)postgresql(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "postgresql_2016(at)163(dot)com" <postgresql_2016(at)163(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: 【ECPG】strncpy function does not set the end character '\0'
Date: 2017-09-07 14:50:22
Message-ID: 1504795822.3276.291.camel@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Oh. If there's actually a standard somewhere that says it's not
> null-terminated, then code that is expecting it to be so is just
> wrong. No need to change anything in ecpg, IMO.

As I said I haven't checked if this detail is actually in there, but I
guess it was because there is a reason why we, and other databases,
define it that way.

Michael
--
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Meskes at (Debian|Postgresql) dot Org
Jabber: michael at xmpp dot meskes dot org
VfL Borussia! Força Barça! SF 49ers! Use Debian GNU/Linux, PostgreSQL

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Chris Travers 2017-09-07 15:09:40 Re: Proposal: pg_rewind to skip config files
Previous Message Tom Lane 2017-09-07 14:34:01 Re: 【ECPG】strncpy function does not set the end character '\0'