Re: Unbounded %s in sscanf - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: Unbounded %s in sscanf
Date
Msg-id FC507F06-7199-435C-A3EF-0087278E44E8@yesql.se
Whole thread Raw
In response to Re: Unbounded %s in sscanf  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Unbounded %s in sscanf
List pgsql-hackers
> On 28 Jun 2021, at 16:02, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Ugh.  Shouldn't we instead modify the format to read not more than
> two characters?  Even if this is safe on non-malicious input, it
> doesn't seem like good style.

No disagreement, I was only basing it on what is in the tree.  I would propose
that we change the sscanf in _LoadBlobs() too though to eliminate all such
callsites, even though that one is even safer.  I'll prepare a patch once more
caffeine has been ingested.

--
Daniel Gustafsson        https://vmware.com/




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgindent run
Next
From: Andrew Dunstan
Date:
Subject: Re: pgindent run