mirror of
https://github.com/postgres/postgres.git
synced 2025-04-24 10:47:04 +03:00
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
This commit is contained in:
parent
9a0dd4fb18
commit
31c36102ca
@ -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";
|
||||
|
Loading…
x
Reference in New Issue
Block a user