pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Daniel Gustafsson <dgustafsson@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix array subscript warnings
Date: Thu, 30 Nov 2023 09:58:55 +0000
Message-ID: <E1r8dot-007wZA-DW@gemulon.postgresql.org> (raw)

Fix array subscript warnings

Commit a5cf808be55 accidentally passed signed chars to isalpha and
isspace in the parser code which leads to undefined behavior.  Fix
by casting the parameters to unsigned chars.

Author: Pavel Stehule <pavel.stehule@gmail.com>
Reported-by: Tom Lane <tgl@sss.pgh.pa.us>
Reported-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/388186.1701315586@sss.pgh.pa.us
Discussion: https://postgr.es/m/ZWgg5xim2CXQcfmh@paquier.xyz

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/17935e1fdf0aff083347b4b2d6268d945041d188

Modified Files
--------------
src/bin/pg_dump/filter.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)



Message-ID: <E1r8dot-007wZA-DW@gemulon.postgresql.org>
Permalink:  ../E1r8dot-007wZA-DW@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1r8dot-007wZA-DW@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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: dgustafsson@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix array subscript warnings
  In-Reply-To: <E1r8dot-007wZA-DW@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