pgsql: Fix array subscript warnings

From: Daniel Gustafsson <dgustafsson(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix array subscript warnings
Date: 2023-11-30 09:58:55
Message-ID: E1r8dot-007wZA-DW@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(dot)stehule(at)gmail(dot)com>
Reported-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Reported-by: Michael Paquier <michael(at)paquier(dot)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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alexander Korotkov 2023-11-30 11:48:05 pgsql: Fix typo in 5a1dfde8334b
Previous Message Alexander Korotkov 2023-11-30 09:36:25 pgsql: Fix warning due non-standard inline declaration in 4ed8f0913bfdb