File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -969,25 +969,25 @@ generate_nonce(char *result, int len)
969
969
/* Use the salt generated for SASL authentication */
970
970
memset (result , 0 , len );
971
971
if (MyProcPort == NULL ) {
972
- int count ;
972
+ int count = 0 ;
973
973
/* compute the salt to use for computing responses */
974
974
while (count < sizeof (MyProcPort -> SASLSalt ) && count < len )
975
975
{
976
- char byte ;
976
+ char byte ;
977
977
if (!pg_strong_random (& byte , 1 ))
978
978
{
979
979
elog (ERROR , "Could not generate random salt" );
980
- }
980
+ }
981
981
/*
982
982
* Only ASCII printable characters, except commas are accepted in
983
983
* the nonce.
984
984
*/
985
985
if (byte < '!' || byte > '~' || byte == ',' )
986
986
continue ;
987
-
987
+
988
988
result [count ++ ] = byte ;
989
989
}
990
- } else {
990
+ } else {
991
991
memcpy (result , MyProcPort -> SASLSalt , Min (sizeof (MyProcPort -> SASLSalt ), len ));
992
992
}
993
993
}
You can’t perform that action at this time.
0 commit comments