pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Avoid unnecessary use of strncpy in a couple of places in ecpg.
6+ messages / 1 participants
[nested] [flat]

* pgsql: Avoid unnecessary use of strncpy in a couple of places in ecpg.
@ 2018-06-16 18:59  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2018-06-16 18:59 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid unnecessary use of strncpy in a couple of places in ecpg.

Use of strncpy with a length limit based on the source, rather than
the destination, is non-idiomatic and draws warnings from gcc 8.
Replace with memcpy, which does exactly the same thing in these cases,
but with less chance for confusion.

Backpatch to all supported branches.

Discussion: https://postgr.es/m/21789.1529170195@sss.pgh.pa.us

Branch
------
REL9_3_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/537d7f3e18757ac6ddab2e7cec80cc27bf303795

Modified Files
--------------
src/interfaces/ecpg/ecpglib/descriptor.c | 2 +-
src/interfaces/ecpg/pgtypeslib/common.c  | 6 ++----
2 files changed, 3 insertions(+), 5 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Avoid unnecessary use of strncpy in a couple of places in ecpg.
@ 2018-06-16 18:59  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2018-06-16 18:59 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid unnecessary use of strncpy in a couple of places in ecpg.

Use of strncpy with a length limit based on the source, rather than
the destination, is non-idiomatic and draws warnings from gcc 8.
Replace with memcpy, which does exactly the same thing in these cases,
but with less chance for confusion.

Backpatch to all supported branches.

Discussion: https://postgr.es/m/21789.1529170195@sss.pgh.pa.us

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/58065f9eed68fae83ddf98c8dff24ae8f0b62f0c

Modified Files
--------------
src/interfaces/ecpg/ecpglib/descriptor.c | 2 +-
src/interfaces/ecpg/pgtypeslib/common.c  | 6 ++----
2 files changed, 3 insertions(+), 5 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Avoid unnecessary use of strncpy in a couple of places in ecpg.
@ 2018-06-16 18:59  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2018-06-16 18:59 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid unnecessary use of strncpy in a couple of places in ecpg.

Use of strncpy with a length limit based on the source, rather than
the destination, is non-idiomatic and draws warnings from gcc 8.
Replace with memcpy, which does exactly the same thing in these cases,
but with less chance for confusion.

Backpatch to all supported branches.

Discussion: https://postgr.es/m/21789.1529170195@sss.pgh.pa.us

Branch
------
REL9_4_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/cd56194d189dd616ad432110af2d8bf8dd533845

Modified Files
--------------
src/interfaces/ecpg/ecpglib/descriptor.c | 2 +-
src/interfaces/ecpg/pgtypeslib/common.c  | 6 ++----
2 files changed, 3 insertions(+), 5 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Avoid unnecessary use of strncpy in a couple of places in ecpg.
@ 2018-06-16 18:59  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2018-06-16 18:59 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid unnecessary use of strncpy in a couple of places in ecpg.

Use of strncpy with a length limit based on the source, rather than
the destination, is non-idiomatic and draws warnings from gcc 8.
Replace with memcpy, which does exactly the same thing in these cases,
but with less chance for confusion.

Backpatch to all supported branches.

Discussion: https://postgr.es/m/21789.1529170195@sss.pgh.pa.us

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/8c924855456eff392391eba49cb02ae581a12898

Modified Files
--------------
src/interfaces/ecpg/ecpglib/descriptor.c | 2 +-
src/interfaces/ecpg/pgtypeslib/common.c  | 6 ++----
2 files changed, 3 insertions(+), 5 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Avoid unnecessary use of strncpy in a couple of places in ecpg.
@ 2018-06-16 18:59  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2018-06-16 18:59 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid unnecessary use of strncpy in a couple of places in ecpg.

Use of strncpy with a length limit based on the source, rather than
the destination, is non-idiomatic and draws warnings from gcc 8.
Replace with memcpy, which does exactly the same thing in these cases,
but with less chance for confusion.

Backpatch to all supported branches.

Discussion: https://postgr.es/m/21789.1529170195@sss.pgh.pa.us

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/8b444a3539758ce6666679608f3765608f92e0df

Modified Files
--------------
src/interfaces/ecpg/ecpglib/descriptor.c | 2 +-
src/interfaces/ecpg/pgtypeslib/common.c  | 6 ++----
2 files changed, 3 insertions(+), 5 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Avoid unnecessary use of strncpy in a couple of places in ecpg.
@ 2018-06-16 18:59  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2018-06-16 18:59 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid unnecessary use of strncpy in a couple of places in ecpg.

Use of strncpy with a length limit based on the source, rather than
the destination, is non-idiomatic and draws warnings from gcc 8.
Replace with memcpy, which does exactly the same thing in these cases,
but with less chance for confusion.

Backpatch to all supported branches.

Discussion: https://postgr.es/m/21789.1529170195@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/6b74f5eaadc4489e08a23686f99f096ad0e08936

Modified Files
--------------
src/interfaces/ecpg/ecpglib/descriptor.c | 2 +-
src/interfaces/ecpg/pgtypeslib/common.c  | 6 ++----
2 files changed, 3 insertions(+), 5 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2018-06-16 18:59 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-06-16 18:59 pgsql: Avoid unnecessary use of strncpy in a couple of places in ecpg. Tom Lane <tgl@sss.pgh.pa.us>
2018-06-16 18:59 pgsql: Avoid unnecessary use of strncpy in a couple of places in ecpg. Tom Lane <tgl@sss.pgh.pa.us>
2018-06-16 18:59 pgsql: Avoid unnecessary use of strncpy in a couple of places in ecpg. Tom Lane <tgl@sss.pgh.pa.us>
2018-06-16 18:59 pgsql: Avoid unnecessary use of strncpy in a couple of places in ecpg. Tom Lane <tgl@sss.pgh.pa.us>
2018-06-16 18:59 pgsql: Avoid unnecessary use of strncpy in a couple of places in ecpg. Tom Lane <tgl@sss.pgh.pa.us>
2018-06-16 18:59 pgsql: Avoid unnecessary use of strncpy in a couple of places in ecpg. 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