提交 d1c13010 编写于 作者: T Thomas G. Lockhart

Version string was truncating the last character.

Use memcpy() rather than StrNCpy() which had forced a string termination
 character at the end.
上级 5763683c
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* *
* IDENTIFICATION * IDENTIFICATION
* *
* $Header: /cvsroot/pgsql/src/backend/utils/adt/version.c,v 1.5 1999/02/13 23:19:36 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/adt/version.c,v 1.6 1999/04/06 15:35:36 thomas Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -25,7 +25,7 @@ version(void) ...@@ -25,7 +25,7 @@ version(void)
text *ret = (text *) palloc(n); text *ret = (text *) palloc(n);
VARSIZE(ret) = n; VARSIZE(ret) = n;
StrNCpy(VARDATA(ret), PG_VERSION_STR, strlen(PG_VERSION_STR)); memcpy(VARDATA(ret), PG_VERSION_STR, strlen(PG_VERSION_STR));
return ret; return ret;
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册