mirror of
https://github.com/postgres/postgres.git
synced 2026-03-12 05:32:27 -04:00
Fix "off by VARHDRSZ" bug in (Cyrillic) recode support.
This commit is contained in:
parent
73470b27ce
commit
7ff8d11065
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue