Fix use of possible uninitialized variable retval (src/pl/plpgsql/src/pl_handler.c)

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Fix use of possible uninitialized variable retval (src/pl/plpgsql/src/pl_handler.c)
Date: 2024-05-27 14:31:24
Message-ID: CAEudQAoDXrVNV8M9q2k4xycxuBrebh0NRPECXFa1N-Z8q-B7ww@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi.

The function *plpgsql_inline_handler* can use uninitialized
variable retval, if PG_TRY fails.
Fix like function*plpgsql_call_handler* wich declare retval as
volatile and initialize to (Datum 0).

best regards,
Ranier Vilela

Attachment Content-Type Size
fix-use-uninitialized-retval-variable-pl_handler.patch application/octet-stream 415 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ranier Vilela 2024-05-27 14:52:20 Fix possible dereference null pointer (PQprint)
Previous Message Ranier Vilela 2024-05-27 14:06:30 Re: Fix calloc check if oom (PQcancelCreate)