-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
segmentation fault with strlen(0) on the different extension version. #34
Comments
I also found the reproduce steps in V1.8.
|
Above reproduce steps on the patched version:
|
harukat
changed the title
segmentation failt with strlen(0) on the different extension version.
segmentation fault with strlen(0) on the different extension version.
Jul 3, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A SEGV occurred in the code of pg_store_plan during operation.
The pg_store_plans module used are source built from the latest code in the repository at this time,
but EXTENTSION haven't be updated from version 1.5.
A stack trace of the core dump is shown below.
In the pg_store_plans_internal() function, the value of char* pstr was obtained, which could be NULL, but the value was passed to the pgsp_json_textize() function and init_json_lex_context() function without NULL checking, and finally strlen(0) was executed, causing the crash.
It is considered better to add a NULL check somewhere (with a warning log message if necessary) and simply abort processing on the data.
The text was updated successfully, but these errors were encountered: