pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Ensure that length argument of memcmp() isn't seen as negative.
2+ messages / 2 participants
[nested] [flat]
* pgsql: Ensure that length argument of memcmp() isn't seen as negative.
@ 2022-02-15 22:28 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 2+ messages in thread
From: Tom Lane @ 2022-02-15 22:28 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Ensure that length argument of memcmp() isn't seen as negative.
I think this will shut up a weird warning from buildfarm member
serinus. Perhaps it'd be better to change tsCompareString's
length arguments to unsigned, but that seems more invasive
than is justified.
Part of a general push to remove off-the-beaten-track warnings
where we can easily do so.
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/3b0ee7f583dc347c4aecb57d35830d2f99956e5c
Modified Files
--------------
src/backend/utils/adt/tsvector_op.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: pgsql: Ensure that length argument of memcmp() isn't seen as negative.
@ 2022-02-15 22:46 Andres Freund <andres@anarazel.de>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Andres Freund @ 2022-02-15 22:46 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers@lists.postgresql.org
Hi,
On 2022-02-15 22:28:23 +0000, Tom Lane wrote:
> Ensure that length argument of memcmp() isn't seen as negative.
>
> I think this will shut up a weird warning from buildfarm member
> serinus. Perhaps it'd be better to change tsCompareString's
> length arguments to unsigned, but that seems more invasive
> than is justified.
Just FYI, I'd reported this to gcc some time last year
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100442
and then forgot about it.
They're not wrong there is the possibility of exceeding the bounds, but the
error message still is quite confusing.
Greetings,
Andres Freund
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2022-02-15 22:46 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-02-15 22:28 pgsql: Ensure that length argument of memcmp() isn't seen as negative. Tom Lane <tgl@sss.pgh.pa.us>
2022-02-15 22:46 ` Andres Freund <andres@anarazel.de>
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