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

Commitd2a1ed1

Browse files
Add missing string terminator
When copying the string strncpy won't add nul termination sincethe string length is equal to the length specified. Explicitlyset a nul terminator after copying to properly terminate. Foundvia post-commit review.Author: Rahila Syed <rahilasyed90@gmail.com>Reviewed-by: Daniel Gustafsson <daniel@yesql.se>Discussion:https://postgr.es/m/CAH2L28vt16C9xTuK+K7QZvtA3kCNWXOEiT=gEekUw3Xxp9LVQw@mail.gmail.com
1 parent991407a commitd2a1ed1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎src/backend/utils/mmgr/mcxt.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1663,6 +1663,7 @@ ProcessGetMemoryContextInterrupt(void)
16631663
meminfo[max_stats-1].name=dsa_allocate(MemoryStatsDsaArea,namelen+1);
16641664
nameptr=dsa_get_address(MemoryStatsDsaArea,meminfo[max_stats-1].name);
16651665
strncpy(nameptr,"Remaining Totals",namelen);
1666+
nameptr[namelen]='\0';
16661667
meminfo[max_stats-1].ident=InvalidDsaPointer;
16671668
meminfo[max_stats-1].path=InvalidDsaPointer;
16681669
meminfo[max_stats-1].type=0;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp