Skip to content

Commit 3677e86

Browse files
committed
textin fixed: no more zero-byte (thanks, Erich)
1 parent 59bb41a commit 3677e86

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/utils/adt/varlena.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.9 1997/01/08 08:38:59 bryanh Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.10 1997/01/16 03:53:51 vadim Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -165,7 +165,7 @@ textin(char *inputText)
165165

166166
if (inputText == NULL)
167167
return(NULL);
168-
len = strlen(inputText) + VARHDRSZ + 1;
168+
len = strlen(inputText) + VARHDRSZ;
169169
result = (struct varlena *) palloc(len);
170170
VARSIZE(result) = len;
171171
memmove(VARDATA(result), inputText, len - VARHDRSZ);

0 commit comments

Comments
 (0)