Fix possible buffer overrun in hba.c.
authorThomas Munro
Tue, 13 Nov 2018 03:27:08 +0000 (16:27 +1300)
committerThomas Munro
Tue, 13 Nov 2018 03:27:08 +0000 (16:27 +1300)
commit726ca18f94e10c11f8dd3774eb56e76a82729f40
treefbb4e61fd3995ad045a303dcf1f2c0538af8396f
parent15b9d47c8e15d11f26fe02955698edd7eafaeb75
Fix possible buffer overrun in hba.c.

Coverty reports a possible buffer overrun in the code that populates the
pg_hba_file_rules view.  It may not be a live bug due to restrictions
on options that can be used together, but let's increase MAX_HBA_OPTIONS
and correct a nearby misleading comment.

Back-patch to 10 where this code arrived.

Reported-by: Julian Hsiao
Discussion: https://postgr.es/m/CADnGQpzbkWdKS2YHNifwAvX5VEsJ5gW49U4o-7UL5pzyTv4vTg%40mail.gmail.com
src/backend/libpq/hba.c