From b1788658913c2dff6741445b159ba69c6f1a5c82 Mon Sep 17 00:00:00 2001
From: Tom Lane <tgl@sss.pgh.pa.us>
Date: Sun, 19 Mar 2000 22:10:52 +0000
Subject: [PATCH] cash_words_out function truncated its output by 1 character
 due to incorrect use of StrNCpy.

---
 src/backend/utils/adt/cash.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/backend/utils/adt/cash.c b/src/backend/utils/adt/cash.c
index 1dd31df3438..a255e2a3d0e 100644
--- a/src/backend/utils/adt/cash.c
+++ b/src/backend/utils/adt/cash.c
@@ -9,7 +9,7 @@
  * workings can be found in the book "Software Solutions in C" by
  * Dale Schumacher, Academic Press, ISBN: 0-12-632360-7.
  *
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.33 2000/01/15 02:59:36 petere Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.34 2000/03/19 22:10:52 tgl Exp $
  */
 
 #include <limits.h>
@@ -723,7 +723,7 @@ cash_words_out(Cash *value)
 	/* make a text type for output */
 	result = (text *) palloc(strlen(buf) + VARHDRSZ);
 	VARSIZE(result) = strlen(buf) + VARHDRSZ;
-	StrNCpy(VARDATA(result), buf, strlen(buf));
+	memcpy(VARDATA(result), buf, strlen(buf));
 
 	return result;
 }	/* cash_words_out() */
-- 
GitLab