Compiler warning about overflow in xlog.c - Mailing list pgsql-hackers

From Petr Jelinek
Subject Compiler warning about overflow in xlog.c
Date
Msg-id 5560DA7C.2030908@2ndquadrant.com
Whole thread Raw
Responses Re: Compiler warning about overflow in xlog.c  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

my compiler complains about overflow in xlog.c.

There is variable defined as char partialfname[MAXFNAMELEN]; but is used
as snprintf(partialfname, MAXPGPATH, "%s.partial", origfname);

There is no practical issue as the actual filename length is never over
MAXFNAMELEN even with the .partial suffix but the code should still be
fixed which is what attached one-line patch does.

--
  Petr Jelinek                  http://www.2ndQuadrant.com/
  PostgreSQL Development, 24x7 Support, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql: Allow GiST distance function to return merely a lower-bound.
Next
From: Petr Jelinek
Date:
Subject: Re: jsonb_set: update or upsert default?