saslprep-test.patch

text/plain

Filename: saslprep-test.patch
Type: text/plain
Part: 0
Message: Re: Non-compliant SASLprep implementation for ASCII characters

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/test/modules/test_saslprep/test_saslprep.c 2 1
diff --git a/src/test/modules/test_saslprep/test_saslprep.c b/src/test/modules/test_saslprep/test_saslprep.c
index 70ff7069bf70..121212d4fa21 100644
--- a/src/test/modules/test_saslprep/test_saslprep.c
+++ b/src/test/modules/test_saslprep/test_saslprep.c
@@ -84,7 +84,8 @@ test_saslprep(PG_FUNCTION_ARGS)
 	 * Copy the input given, to make SASLprep() act on a sanitized string.
 	 */
 	input_data = palloc0(src_len + 1);
-	strlcpy(input_data, src, src_len + 1);
+	memcpy(input_data, src, src_len);
+	input_data[src_len] = '\0';
 
 	rc = pg_saslprep(input_data, &result);
 	status = saslprep_status_to_text(rc);