Github user sansanichfb commented on a diff in the pull request:
    --- Diff: src/bin/psql/describe.c ---
    @@ -4316,10 +4316,10 @@ describePxfTable(const char *profile, const char 
*pattern, bool verbose)
                if (verbose)
                        sourcefieldtype = PQgetvalue(res, i, 4);
    -                   total_fields = PQgetvalue(res, i, 5);
    +                   total_fields = atoi(PQgetvalue(res, i, 5));
    --- End diff --
    PQgetvalue returns char* and if you assign it directly to int variable, it 
will be just some random int value. When this value happened to be positive, it 
would just allocate enormous chunk of memory but in case of negative 
value(mostly when you just started psql, so heap is small) it would fail with 

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

Reply via email to