Missing NULL check after calling ecpg_strdup

2025-07-11 Thread Evgeniy Gorbanev
Hi! In case of out_of_memory, the ecpg_strdup function may return NULL. Checks should be added in src/interfaces/ecpg/ecpglib/execute.c. Patch attached. Found by Linux Verification Center (linuxtesting.org) with SVACE. -- Best regards, Evgeniy  Gorbanev diff --git a/src/interfaces/ecpg/ecpglib

Re: No error checking when reading from file using zstd in pg_dump

2025-06-16 Thread Evgeniy Gorbanev
16.06.2025 15:43, Daniel Gustafsson пишет: On 16 Jun 2025, at 11:26, Evgeniy Gorbanev wrote: I ran tests for pg_dump and they all passed. Logs attached. Files=7, Tests=11918, 35 wallclock secs ( 0.59 usr 0.07 sys + 7.92 cusr 4.32 csys = 12.90 CPU) That seems like a low number of tests

Re: No error checking when reading from file using zstd in pg_dump

2025-06-16 Thread Evgeniy Gorbanev
16.06.2025 15:00, Daniel Gustafsson пишет: On 16 Jun 2025, at 10:52, Evgeniy Gorbanev wrote: 16.06.2025 14:25, Daniel Gustafsson пишет: On 16 Jun 2025, at 10:14, Evgeniy Gorbanev wrote: In src/bin/pg_dump/compress_zstd.c, the Zstd_read function always returns true. But if you look at the

Re: No error checking when reading from file using zstd in pg_dump

2025-06-16 Thread Evgeniy Gorbanev
16.06.2025 14:25, Daniel Gustafsson пишет: On 16 Jun 2025, at 10:14, Evgeniy Gorbanev wrote: In src/bin/pg_dump/compress_zstd.c, the Zstd_read function always returns true. But if you look at the Zstd_gets and Zstd_getc functions, where Zstd_read is called via CFH->read_func, it is expec

No error checking when reading from file using zstd in pg_dump

2025-06-16 Thread Evgeniy Gorbanev
the process is expected to terminate, but pg_dump will continue the process. I assume that after checking if (cnt == 0) should be return false; Patch attached. Found by Linux Verification Center (linuxtesting.org) with SVACE. Reporter: Evgeniy Gorbanev (gorbanyo...@basealt.ru). Organization: Base