Commit 7ff8d110 authored by Peter Eisentraut's avatar Peter Eisentraut

Fix "off by VARHDRSZ" bug in (Cyrillic) recode support.

parent 73470b27
......@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.75 2001/03/22 03:59:55 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.76 2001/04/19 19:01:23 petere Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -361,7 +361,7 @@ varcharin(PG_FUNCTION_ARGS)
memcpy(VARDATA(result), s, len - VARHDRSZ);
#ifdef CYR_RECODE
convertstr(VARDATA(result), len, 0);
convertstr(VARDATA(result), len - VARHDRSZ, 0);
#endif
PG_RETURN_VARCHAR_P(result);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment