BUG #17622: a potential bug of NPD - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #17622: a potential bug of NPD
Date
Msg-id 17622-1163f4b81b882c9d@postgresql.org
Whole thread Raw
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      17622
Logged by:          a potential bug of NPD
Email address:      1157401338@qq.com
PostgreSQL version: 14.5
Operating system:   ubuntu20.04
Description:

Hi, I found a potential null pointer dereference bug in the project source
code of postgre, and I have shown the execution sequence of the program that
may generate the bug on a graph,which can be access by
https://user-images.githubusercontent.com/87304478/192184761-d7713433-074a-4178-bdc2-78f2bf4fb764.png.
The red text illustrates the steps that generate the bug, the red arrows
represent the control flow,the file path can be seen in the blue framed
section.

It should be noted that in the call to the timestamp_to_asc function, in
addition to the fact that step3 returns null, it may also return null
because of BAD_TIMESTAMP, as shown in line 287 of timestamp.c, after errno
is set to the corresponding value, return null to caller.

Although the code shown is for version 12.12 but is still exist in current
version

would you can help to check if this bug is true?thank you for your effort
and patience!


pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #17607: Server process crashes when PLpgSQL function raises error in subtransaction
Next
From: Michael Paquier
Date:
Subject: Re: BUG #17385: "RESET transaction_isolation" inside serializable transaction causes Assert at the transaction end