[PATCH 6/6] cli/dump: replace use of gzprintf with gzputs for config values

Subject: [PATCH 6/6] cli/dump: replace use of gzprintf with gzputs for config values

Date: Mon, 13 Apr 2020 09:36:23 -0300

To: David Bremner

Cc: notmuch@notmuchmail.org

From: David Bremner


These can be large, and hit buffer limitations of gzprintf.
---
 notmuch-dump.c             | 4 +++-
 test/T600-named-queries.sh | 1 -
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/notmuch-dump.c b/notmuch-dump.c
index 52a88283..887ef7f0 100644
--- a/notmuch-dump.c
+++ b/notmuch-dump.c
@@ -51,7 +51,9 @@ database_dump_config (notmuch_database_t *notmuch, gzFile output)
 	    goto DONE;
 	}
 
-	GZPRINTF (output, " %s\n", buffer);
+	GZPUTS (output, " ");
+	GZPUTS (output, buffer);
+	GZPUTS (output, "\n");
     }
 
     ret = EXIT_SUCCESS;
diff --git a/test/T600-named-queries.sh b/test/T600-named-queries.sh
index 852f7530..421a11d4 100755
--- a/test/T600-named-queries.sh
+++ b/test/T600-named-queries.sh
@@ -37,7 +37,6 @@ EOF
 test_expect_equal_file QUERIES.BEFORE OUTPUT
 
 test_begin_subtest 'dumping large queries'
-test_subtest_known_broken
 # This value is just large enough to trigger a limitation of gzprintf
 # to 8191 bytes in total (by default).
 repeat=1329
-- 
2.25.1

_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Thread: