Skip to content
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

Add check for malloc failure in libpq calls #5446

Merged
merged 1 commit into from Mar 16, 2023

Commits on Mar 16, 2023

  1. Add check for malloc failure in libpq calls

    The functions `PQconndefaults` and `PQmakeEmptyPGresult` calls
    `malloc` and can return NULL if it fails to allocate memory for the
    defaults and the empty result. It is checked with an `Assert`, but this
    will be removed in production builds.
    
    Replace the `Assert` with an checks to generate an error in production
    builds rather than trying to de-reference the pointer and cause a
    crash.
    mkindahl committed Mar 16, 2023
    Configuration menu
    Copy the full SHA
    fc46c84 View commit details
    Browse the repository at this point in the history