coverity-backup-compression-fix.patch

application/octet-stream

Filename: coverity-backup-compression-fix.patch
Type: application/octet-stream
Part: 0
Message: Re: refactoring basebackup.c (zstd workers)

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: unified
File+
src/common/backup_compression.c 6 1
diff --git a/src/common/backup_compression.c b/src/common/backup_compression.c
index 0650f975c4..8eb670848b 100644
--- a/src/common/backup_compression.c
+++ b/src/common/backup_compression.c
@@ -177,6 +177,10 @@ parse_bc_specification(bc_algorithm algorithm, char *specification,
 			result->level = expect_integer_value(keyword, value, result);
 			result->options |= BACKUP_COMPRESSION_OPTION_LEVEL;
 		}
+		else if (strcmp(keyword, "example") == 0)
+		{
+			/* this is just an example */
+		}
 		else
 			result->parse_error =
 				psprintf(_("unknown compression option \"%s\""), keyword);
@@ -187,7 +191,8 @@ parse_bc_specification(bc_algorithm algorithm, char *specification,
 			pfree(value);
 
 		/* If we got an error or have reached the end of the string, stop. */
-		if (result->parse_error != NULL || *kwend == '\0' || *vend == '\0')
+		if (result->parse_error != NULL ||
+			(vend == NULL ? *kwend == '\0' : *vend == '\0'))
 			break;
 
 		/* Advance to next entry and loop around. */