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

Commitde5afdd

Browse files
committed
Fix overflow in bsearch_arg() with more than INT_MAX elements
This was introduced in commitbfa2cee, which replaced the oldbsearch_cmp() function we had in extended_stats.c with the currentimplementation. The original discussion or commit message ofbfa2cee didn't mention where the new implementation came from, butbased on some googling, I'm guessing *BSD or libiberty, all of whichshare this same code, with or without this fix.Author: Ranier VilelaReviewed-by: Nathan BossartBackpatch-through: 14Discussion:https://www.postgresql.org/message-id/CAEudQAp34o_8u6sGSVraLwuMv9F7T9hyHpePXHmRaxR2Aboi%2Bw%40mail.gmail.com
1 parent22bb889 commitde5afdd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/port/bsearch_arg.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ bsearch_arg(const void *key, const void *base0,
5858
void*arg)
5959
{
6060
constchar*base= (constchar*)base0;
61-
intlim,
62-
cmp;
61+
size_tlim;
62+
intcmp;
6363
constvoid*p;
6464

6565
for (lim=nmemb;lim!=0;lim >>=1)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp