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

Commit649dc92

Browse files
committed
fix uninitialized variable
1 parentb130956 commit649dc92

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎src/backend/libpq/auth-scram.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -969,25 +969,25 @@ generate_nonce(char *result, int len)
969969
/* Use the salt generated for SASL authentication */
970970
memset(result,0,len);
971971
if (MyProcPort==NULL) {
972-
intcount;
972+
intcount=0;
973973
/* compute the salt to use for computing responses */
974974
while (count<sizeof(MyProcPort->SASLSalt)&&count<len)
975975
{
976-
charbyte;
976+
charbyte;
977977
if (!pg_strong_random(&byte,1))
978978
{
979979
elog(ERROR,"Could not generate random salt");
980-
}
980+
}
981981
/*
982982
* Only ASCII printable characters, except commas are accepted in
983983
* the nonce.
984984
*/
985985
if (byte<'!'||byte>'~'||byte==',')
986986
continue;
987-
987+
988988
result[count++]=byte;
989989
}
990-
}else {
990+
}else {
991991
memcpy(result,MyProcPort->SASLSalt,Min(sizeof(MyProcPort->SASLSalt),len));
992992
}
993993
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp