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

Commit9c15a77

Browse files
committed
Fix misparsing of empty value in conninfo_uri_parse_params().
After finding an "=" character, the pointer was advanced twice when itshould only advance once. This is harmless as long as the value after "="has at least one character; but if it doesn't, we'd miss the terminatorcharacter and include too much in the value.In principle this could lead to reading off the end of memory. It does notseem worth treating as a security issue though, because it would happen onclient side, and besides client logic that's taking conninfo strings fromuntrusted sources has much worse security problems than this.Report and patch received off-list from Thomas Fanghaenel.Back-patch to 9.2 where the faulty code was introduced.
1 parent66463a3 commit9c15a77

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

‎src/interfaces/libpq/fe-connect.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4965,9 +4965,8 @@ conninfo_uri_parse_params(char *params,
49654965
++p;
49664966
break;
49674967
}
4968-
4969-
/* Advance, NUL is checked in the 'if' above */
4970-
++p;
4968+
else
4969+
++p;/* Advance over all other bytes. */
49714970
}
49724971

49734972
keyword=conninfo_uri_decode(keyword,errorMessage);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp