compress_zstd.diff

text/x-patch

Filename: compress_zstd.diff
Type: text/x-patch
Part: 0
Message: No error checking when reading from file using zstd in pg_dump

Patch

Format: unified
File+
src/bin/pg_dump/compress_zstd.c 1 1
diff --git a/src/bin/pg_dump/compress_zstd.c b/src/bin/pg_dump/compress_zstd.c
index cb595b10c2d..d0a58861228 100644
--- a/src/bin/pg_dump/compress_zstd.c
+++ b/src/bin/pg_dump/compress_zstd.c
@@ -298,7 +298,7 @@ Zstd_read(void *ptr, size_t size, size_t *rdsize, CompressFileHandle *CFH)
 
 			/* If we have no more input to consume, we're done */
 			if (cnt == 0)
-				break;
+				return false;
 		}
 
 		while (input->pos < input->size)