mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-09 08:10:09 +08:00
diff -ru ../../../orig/postgres95/src/backend/utils/adt/varlena.c
./utils/adt/varlena.c - --- ../../../orig/postgres95/src/backend/utils/adt/varlena.c Mon Jul 22 23:56:04 1996 +++ ./utils/adt/varlena.c Tue Sep 17 15:12:55 1996 @@ -166,7 +166,7 @@ if (inputText == NULL) return(NULL); - - len = strlen(inputText) + VARHDRSZ; + len = strlen(inputText) + VARHDRSZ + 1 /* terminating 0 */; result = (struct varlena *) palloc(len); VARSIZE(result) = len; memmove(VARDATA(result), inputText, len - VARHDRSZ); Submitted by: skimo@breughel.ufsia.ac.be (Sven Verdoolaege)
This commit is contained in:
parent
fb7f8e7655
commit
d00f621d7b
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.5 1996/09/10 06:41:38 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.6 1996/09/23 08:31:01 scrappy Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -166,7 +166,7 @@ textin(char *inputText)
|
||||
|
||||
if (inputText == NULL)
|
||||
return(NULL);
|
||||
len = strlen(inputText) + VARHDRSZ;
|
||||
len = strlen(inputText) + VARHDRSZ + 1;
|
||||
result = (struct varlena *) palloc(len);
|
||||
VARSIZE(result) = len;
|
||||
memmove(VARDATA(result), inputText, len - VARHDRSZ);
|
||||
|
Loading…
Reference in New Issue
Block a user