Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit31c3610

Browse files
committed
The buffer overrun while creating sequences turns out to be a read
access overrun. For the sake of doing things properly here is apatch which fixes it.This patch is for the file backend/commands/sequence.c.Maurice Gittens
1 parent9a0dd4f commit31c3610

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎src/backend/commands/sequence.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ DefineSequence(CreateSeqStmt *seq)
8585
Datumvalue[SEQ_COL_LASTCOL];
8686
charnull[SEQ_COL_LASTCOL];
8787
inti;
88+
NameDataname;
8889

8990
/* Check and set values */
9091
init_params(seq,&new);
@@ -110,7 +111,8 @@ DefineSequence(CreateSeqStmt *seq)
110111
caseSEQ_COL_NAME:
111112
typnam->name="name";
112113
coldef->colname="sequence_name";
113-
value[i-1]=PointerGetDatum(seq->seqname);
114+
namestrcpy(&name,seq->seqname);
115+
value[i-1]=NameGetDatum(&name);
114116
break;
115117
caseSEQ_COL_LASTVAL:
116118
typnam->name="int4";

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp