Re: Fix uninitialized copy_data var (src/backend/commands/subscriptioncmds.c)
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Peter Smith <smithpb2250@gmail.com>
Cc: Ranier Vilela <ranier.vf@gmail.com>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2021-06-28T03:29:06Z
Lists: pgsql-hackers
On Mon, Jun 28, 2021 at 10:17:55AM +1000, Peter Smith wrote: > IIUC for the case ALTER_SUBSCRIPTION_DROP_PUBLICATION it looks like > the uninitialized copy_data local stack var would remain uninitialized > (undefined) still at the time it is passed at > AlterSubscription_refresh(sub, copy_data); Yes, that's wrong. AlterSubscription_refresh() would happily look at this uninitialized value when performing a refresh with this command. That's the only code path using parse_subscription_options() with this pattern. Applied on HEAD. -- Michael
Commits
-
Fix variable initialization with ALTER SUBSCRIPTION DROP PUBLICATION
- 79718c1c6c00 14.0 landed
-
Put option listing back into alphabetical order
- 3af10943ce21 14.0 cited