From 31c36102cab914f6664ee2db20c7732aeb51a02b Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Mon, 30 Mar 1998 17:15:26 +0000 Subject: [PATCH] The buffer overrun while creating sequences turns out to be a read access overrun. For the sake of doing things properly here is a patch which fixes it. This patch is for the file backend/commands/sequence.c. Maurice Gittens --- src/backend/commands/sequence.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c index 8313d15c65..b19879b947 100644 --- a/src/backend/commands/sequence.c +++ b/src/backend/commands/sequence.c @@ -85,6 +85,7 @@ DefineSequence(CreateSeqStmt *seq) Datum value[SEQ_COL_LASTCOL]; char null[SEQ_COL_LASTCOL]; int i; + NameData name; /* Check and set values */ init_params(seq, &new); @@ -110,7 +111,8 @@ DefineSequence(CreateSeqStmt *seq) case SEQ_COL_NAME: typnam->name = "name"; coldef->colname = "sequence_name"; - value[i - 1] = PointerGetDatum(seq->seqname); + namestrcpy(&name, seq->seqname); + value[i - 1] = NameGetDatum(&name); break; case SEQ_COL_LASTVAL: typnam->name = "int4"; -- 2.40.0