pg_dump: Fix dangling pointer in EndCompressorZstd()

2025-04-16 Thread Alexander Kuznetsov
istency with other implementations and prevent potential future issues. The patch is attached, would appreciate your thoughts on this change. -- Best regards, Alexander Kuznetsov From 428c60888f96aa5d0b7575a4342cdce4ff0257ab Mon Sep 17 00:00:00 2001 From: Alexander Kuznetsov Date: Wed, 16 Apr 2

Re: Detect buffer underflow in get_th()

2024-12-13 Thread Alexander Kuznetsov
Hello, ping? 24.09.2024 17:52, Alexander Kuznetsov wrote: Hello, is there anything else we can help with or discuss in order to apply this fix? 24.07.2024 18:53, Alexander Kuznetsov пишет: 24.07.2024 18:39, Peter Eisentraut wrote: If it can't happen in practice, maybe an assertion wou

Re: [PATCH] Check for TupleTableSlot nullness before dereferencing

2024-12-13 Thread Alexander Kuznetsov
Hello, ping. What do you think about reasoning below? Maybe we should consider proposing different patch for removing redundant check there? 09.10.2024 18:23, Alexander Kuznetsov wrote: 03.10.2024 12:48, Daniel Gustafsson wrote:  From a quick reading we can only reach there after evaluating

Re: Check for tuplestorestate nullness before dereferencing

2024-10-15 Thread Alexander Kuznetsov
b966e -- Best regards, Alexander Kuznetsov

Check for tuplestorestate nullness before dereferencing

2024-10-14 Thread Alexander Kuznetsov
when calculating eof_tuplestore at line 85. However, since this code hasn't been changed since 2006 and hasn't caused any issues, it is possible that the check for (tuplestorestate == NULL) is redundant when calculating eof_tuplestore. -- Best regards, Alexander

Re: [PATCH] Check for TupleTableSlot nullness before dereferencing

2024-10-09 Thread Alexander Kuznetsov
ion that slot2 can theoretically be NULL, as there is such a check at line 968. Is it possible that no errors have occurred because this condition has always been satisfied and is, perhaps, redundant, or maybe I'm misunderstanding something? -- Best regards, Alexander Kuznetsov

[PATCH] Check for TupleTableSlot nullness before dereferencing

2024-10-03 Thread Alexander Kuznetsov
uring function execution. The patch is attached. -- Best regards, Alexander Kuznetsov From f490d485e3dbdfec7c6804bd96ae47b5a60d7c96 Mon Sep 17 00:00:00 2001 From: Alexander Kuznetsov Date: Thu, 3 Oct 2024 10:24:08 +0300 Subject: [PATCH] Check for TupleTableSlot nullness before dereferencing At the begi

Re: Detect buffer underflow in get_th()

2024-09-24 Thread Alexander Kuznetsov
Hello, is there anything else we can help with or discuss in order to apply this fix? 24.07.2024 18:53, Alexander Kuznetsov пишет: 24.07.2024 18:39, Peter Eisentraut wrote: If it can't happen in practice, maybe an assertion would be enough? In practice, the function should not receiv

Re: Possible null pointer dereference in afterTriggerAddEvent()

2024-09-24 Thread Alexander Kuznetsov
Hello, is there anything else we can help with or discuss in order to apply this fix? 26.07.2024 12:16, Alexander Kuznetsov пишет: 25.07.2024 20:07, Alvaro Herrera wrote: Maybe for sanity (and perhaps for Svace compliance) we could do it the other way around, i.e. by testing events->tail

PostgreSQL's approach to assertion usage: seeking best practices

2024-08-09 Thread Alexander Kuznetsov
ed582%40altlinux.org 3. https://www.postgresql.org/message-id/6d0323c3-3f5d-4137-af73-98a5ab90e77c%40altlinux.org -- Best regards, Alexander Kuznetsov

Re: Possible null pointer dereference in afterTriggerAddEvent()

2024-07-26 Thread Alexander Kuznetsov
d. Previously, this issue could theoretically occur. Consequently, these changes slightly enhance overall security. -- Best regards, Alexander Kuznetsov From 63a3a19fe67bfd1f427b21d53ff0ef642aed89c4 Mon Sep 17 00:00:00 2001 From: Alexander Kuznetsov Date: Fri, 26 Jul 2024 11:55:53 +0300 Subject: [PATC

Possible null pointer dereference in afterTriggerAddEvent()

2024-07-25 Thread Alexander Kuznetsov
in the attachment. -- Best regards, Alexander KuznetsovFrom acabe34b714a9c311bfb85e5be94e6fe906fa9f1 Mon Sep 17 00:00:00 2001 From: Alexander Kuznetsov Date: Thu, 25 Jul 2024 16:24:18 +0300 Subject: [PATCH] Add assertion of an empty list in afterTriggerAddEvent() It is possible for events->tai

Re: Detect buffer underflow in get_th()

2024-07-24 Thread Alexander Kuznetsov
check for zero-length input in a similar manner. But of course it's open for discussion and team decision whether this should be addressed as an assertion or handled differently. -- Best regards, Alexander Kuznetsov

Detect buffer underflow in get_th()

2024-07-24 Thread Alexander Kuznetsov
Mon Sep 17 00:00:00 2001 From: Alexander Kuznetsov Date: Wed, 24 Jul 2024 12:31:45 +0300 Subject: [PATCH] Detect buffer underflow in get_th() If get_th() can receive input that is not a number, then it can also receive empty input. Empty input with zero length can result in a buffer underflow when