Re: inet/cidr: IPv4 prefix length overflows int and passes the range check

From: Andrey Rachitskiy <pl0h0yp1(at)gmail(dot)com>
To: Iliia Khaprov <i(dot)khaprov(at)gmail(dot)com>
Cc: Roman Khapov <rkhapov(at)yandex-team(dot)ru>, pgsql-hackers(at)lists(dot)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: inet/cidr: IPv4 prefix length overflows int and passes the range check
Date: 2026-11-02 21:12:42
Message-ID: CAB8bMivbCEFS7xyi6kybJLQ=mTnnk9shwz6Wq8Rrv04+eavceQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

вт, 3 нояб. 2026 г. в 02:00, Iliia Khaprov <i(dot)khaprov(at)gmail(dot)com>:

> Hi Roman,
>
> Thanks for looking into this.
> I thought about leading zeros, but abandoned it - maybe somebody
> relies on this quirk.
>
>
>
Hi Iliia,
I already made a patch as part of bug 19671 - please take a look at my
version. It covers IPv4 & IPv6.

Attachment Content-Type Size
0001-Fix-IPv4-CIDR-prefix-length-overflow-in-inet_net_pto.patch text/x-patch 10.2 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Burd 2026-11-02 21:28:10 [RFC] Property-based testing for Postgres
Previous Message Iliia Khaprov 2026-11-02 21:00:00 Re: inet/cidr: IPv4 prefix length overflows int and passes the range check