From: | Zhihong Yu <zyu(at)yugabyte(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Noah Misch <noah(at)leadboat(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: null iv parameter passed to combo_init() |
Date: | 2022-01-09 12:37:32 |
Message-ID: | CALNJ-vTuaO+6hM4wY2aE0V7WdB56bwTXDp50Bn2U1ggmonVGbA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Jan 8, 2022 at 11:32 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Noah Misch <noah(at)leadboat(dot)com> writes:
> > On further thought, I would write it this way:
>
> > - else
> > + else if (ivlen != 0)
> > memcpy(ivbuf, iv, ivlen);
>
> FWIW, I liked the "ivlen > 0" formulation better. They should be
> equivalent, because ivlen is unsigned, but it just seems like "> 0"
> is more natural.
>
> regards, tom lane
>
Patch v4 is attached.
Cheers
Attachment | Content-Type | Size |
---|---|---|
0004-memcpy-null.patch | application/octet-stream | 2.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Wei Sun | 2022-01-09 16:19:28 | Add lasterrno setting for dir_existsfile() |
Previous Message | Julien Rouhaud | 2022-01-09 12:13:21 | Re: Multiple Query IDs for a rewritten parse tree |