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

Commit72fe12d

Browse files
committed
Add check for 4Gb segment overflow in CFS
1 parent93d08b2 commit72fe12d

File tree

1 file changed

+4
-0
lines changed
  • src/backend/storage/file

1 file changed

+4
-0
lines changed

‎src/backend/storage/file/fd.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1900,6 +1900,10 @@ FileWrite(File file, char *buffer, int amount)
19001900
* because we want to write all updated pages sequentially
19011901
*/
19021902
pos=cfs_alloc_page(map,CFS_INODE_SIZE(inode),compressedSize);
1903+
if (pos>pos+compressedSize) {
1904+
elog(ERROR,"CFS segment file exceeed 4Gb limit");
1905+
}
1906+
19031907
inode=CFS_INODE(compressedSize,pos);
19041908
buffer=compressedBuffer;
19051909
amount=compressedSize;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp